refactor(lib): improve some trace logs for upgrades

This commit is contained in:
Sean McArthur
2018-06-19 17:38:03 -07:00
parent 9b4083de6b
commit 7d8897537b
4 changed files with 23 additions and 7 deletions

View File

@@ -228,12 +228,14 @@ impl fmt::Debug for OnUpgrade {
impl Pending {
pub(crate) fn fulfill(self, upgraded: Upgraded) {
trace!("pending upgrade fulfill");
let _ = self.tx.send(Ok(upgraded));
}
/// Don't fulfill the pending Upgrade, but instead signal that
/// upgrades are handled manually.
pub(crate) fn manual(self) {
trace!("pending upgrade handled manually");
let _ = self.tx.send(Err(::Error::new_user_manual_upgrade()));
}
}