diff --git a/crates/context/interface/src/block.rs b/crates/context/interface/src/block.rs index fb8d996d01..6743bbba7f 100644 --- a/crates/context/interface/src/block.rs +++ b/crates/context/interface/src/block.rs @@ -79,3 +79,15 @@ pub trait BlockGetter { pub trait BlockSetter: BlockGetter { fn set_block(&mut self, block: ::Block); } + +impl BlockSetter for &mut T { + fn set_block(&mut self, block: ::Block) { + (**self).set_block(block) + } +} + +impl BlockSetter for Box { + fn set_block(&mut self, block: ::Block) { + (**self).set_block(block) + } +} diff --git a/crates/context/interface/src/transaction.rs b/crates/context/interface/src/transaction.rs index db59b2bd17..c13f8712eb 100644 --- a/crates/context/interface/src/transaction.rs +++ b/crates/context/interface/src/transaction.rs @@ -164,3 +164,15 @@ pub trait TransactionGetter { pub trait TransactionSetter: TransactionGetter { fn set_tx(&mut self, tx: ::Transaction); } + +impl TransactionSetter for &mut T { + fn set_tx(&mut self, block: ::Transaction) { + (**self).set_tx(block) + } +} + +impl TransactionSetter for Box { + fn set_tx(&mut self, block: ::Transaction) { + (**self).set_tx(block) + } +}