Skip to content

Commit

Permalink
Use MAX_MONEY in serde regression test
Browse files Browse the repository at this point in the history
We plan on enforcing MAX_MONEY in the amount types. In preparation use
MAX_MONEY in the serde regression test instead of the arbitrary, and too
large DEADBEEFCAFEBABE value.
  • Loading branch information
tcharding committed Jan 24, 2025
1 parent 67f3d49 commit 08bb57e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Binary file modified bitcoin/tests/data/serde/txout_bincode
Binary file not shown.
6 changes: 2 additions & 4 deletions bitcoin/tests/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,8 @@ fn serde_regression_txin() {

#[test]
fn serde_regression_txout() {
let txout = TxOut {
value: Amount::from_sat(0xDEADBEEFCAFEBABE),
script_pubkey: ScriptBuf::from(vec![0u8, 1u8, 2u8]),
};
let txout =
TxOut { value: Amount::MAX_MONEY, script_pubkey: ScriptBuf::from(vec![0u8, 1u8, 2u8]) };
let got = serialize(&txout).unwrap();
let want = include_bytes!("data/serde/txout_bincode") as &[_];
assert_eq!(got, want)
Expand Down

0 comments on commit 08bb57e

Please sign in to comment.