Stop using deprecated OutPoint functions

Either our CI is failing us or `deprecated` does not work as expected,
either way we should not be using the `OutPoint::null()` or `is_null`
functions any more because we deprecated them already.
This commit is contained in:
Tobin C. Harding 2024-09-10 09:32:06 +10:00
parent 08710d81a6
commit f811e0adb6
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
2 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ fn bitcoin_genesis_tx() -> Transaction {
.push_slice(b"The Times 03/Jan/2009 Chancellor on brink of second bailout for banks")
.into_script();
ret.input.push(TxIn {
previous_output: OutPoint::null(),
previous_output: OutPoint::COINBASE_PREVOUT,
script_sig: in_script,
sequence: Sequence::MAX,
witness: Witness::default(),

View File

@ -697,7 +697,7 @@ impl Transaction {
/// all-zeros (creates satoshis "out of thin air").
#[doc(alias = "is_coin_base")] // method previously had this name
pub fn is_coinbase(&self) -> bool {
self.input.len() == 1 && self.input[0].previous_output.is_null()
self.input.len() == 1 && self.input[0].previous_output == OutPoint::COINBASE_PREVOUT
}
/// Returns `true` if the transaction itself opted in to be BIP-125-replaceable (RBF).