Merge rust-bitcoin/rust-bitcoin#3350: Stop using deprecated `OutPoint` functions

f811e0adb6 Stop using deprecated OutPoint functions (Tobin C. Harding)

Pull request description:

  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.

ACKs for top commit:
  Kixunil:
    ACK f811e0adb6
  apoelstra:
    ACK f811e0adb6 successfully ran local tests

Tree-SHA512: 64e75601ce8062da78bbd9aea97792e35c728aa31255348413fe9b57ee585974370d3f59b5467d7e4a65dc05d2718aea18bb381e128c8410fbfde4a851006416
This commit is contained in:
merge-script 2024-09-12 16:32:50 +00:00
commit e027be6457
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
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") .push_slice(b"The Times 03/Jan/2009 Chancellor on brink of second bailout for banks")
.into_script(); .into_script();
ret.input.push(TxIn { ret.input.push(TxIn {
previous_output: OutPoint::null(), previous_output: OutPoint::COINBASE_PREVOUT,
script_sig: in_script, script_sig: in_script,
sequence: Sequence::MAX, sequence: Sequence::MAX,
witness: Witness::default(), witness: Witness::default(),

View File

@ -697,7 +697,7 @@ impl Transaction {
/// all-zeros (creates satoshis "out of thin air"). /// all-zeros (creates satoshis "out of thin air").
#[doc(alias = "is_coin_base")] // method previously had this name #[doc(alias = "is_coin_base")] // method previously had this name
pub fn is_coinbase(&self) -> bool { 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). /// Returns `true` if the transaction itself opted in to be BIP-125-replaceable (RBF).