Refactor sync time verification
Instead of verifying txs at sync time in every backend, its moved to script_sync to by default be available to any backend.
This commit is contained in:
@@ -190,19 +190,6 @@ impl Blockchain for ElectrumBlockchain {
|
||||
.output
|
||||
.get(input.previous_output.vout as usize)
|
||||
.ok_or_else(electrum_goof)?;
|
||||
// Verify this input if requested via feature flag
|
||||
#[cfg(feature = "verify")]
|
||||
{
|
||||
use crate::wallet::verify::VerifyError;
|
||||
let serialized_tx = bitcoin::consensus::serialize(&tx);
|
||||
bitcoinconsensus::verify(
|
||||
txout.script_pubkey.to_bytes().as_ref(),
|
||||
txout.value,
|
||||
&serialized_tx,
|
||||
input_index,
|
||||
)
|
||||
.map_err(|e| VerifyError::from(e))?;
|
||||
}
|
||||
input_index += 1;
|
||||
Ok(Some(txout.clone()))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user