Started to extract some steps

Tealised that the whole point is for them to be idempotent to be useful
This commit is contained in:
Franck Royer 2020-11-25 16:16:04 +11:00 committed by rishflab
parent 66866f8fbd
commit 437c1cbb80
4 changed files with 143 additions and 141 deletions

View file

@ -186,9 +186,8 @@ pub trait WatchForRawTransaction {
async fn watch_for_raw_transaction(&self, txid: Txid) -> Transaction;
}
#[async_trait]
pub trait GetRawTransaction {
async fn get_raw_transaction(&self, txid: Txid) -> Result<Transaction>;
pub trait WaitForTransactionFinality {
async fn wait_for_transaction_finality(&self, txid: Txid);
}
#[async_trait]
@ -208,7 +207,7 @@ pub trait WaitForBlockHeight {
#[async_trait]
pub trait GetRawTransaction {
async fn get_raw_transaction(&self, txid: Txid) -> Option<Transaction>;
async fn get_raw_transaction(&self, txid: Txid) -> Result<Transaction>;
}
pub fn recover(S: PublicKey, sig: Signature, encsig: EncryptedSignature) -> Result<SecretKey> {