pub fn verify_tx<D: Database, B: GetTx>(
tx: &Transaction,
database: &D,
blockchain: &B
) -> Result<(), VerifyError>
Available on crate feature
verify
only.Expand description
Verify a transaction against the consensus rules
This function uses bitcoinconsensus
to verify transactions by fetching the required data
either from the Database
or using the [Blockchain
].
Depending on the capabilities of the
[Blockchain
] backend, the method could fail when called with old “historical” transactions or
with unconfirmed transactions that have been evicted from the backend’s memory.