What changed, and why it matters
This commit only updates a test file. It adds two new data types (Target and Work) to an existing regression test that checks serialization behavior, and refreshes a binary test fixture. There is no change to production code, no security fix, and no vulnerability.
No action required; this is a routine test maintenance commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies units/tests/serde.rs to include target: Target and work: Work in the Serde test struct, populated with Target::MAX_ATTAINABLE_MAINNET and its to_work() conversion. It also updates the binary units/tests/data/serde_bincode regression fixture. No library source code is changed.
Changed components
units/tests/serde.rsunits/tests/data/serde_bincodeInspect captured patch +6 / −0
diff --git a/units/tests/data/serde_bincode b/units/tests/data/serde_bincode
index 9131b615..c820e1a8 100644
Binary files a/units/tests/data/serde_bincode and b/units/tests/data/serde_bincode differ
diff --git a/units/tests/serde.rs b/units/tests/serde.rs
index 2d184e2f..aa20f059 100644
--- a/units/tests/serde.rs
+++ b/units/tests/serde.rs
@@ -57,6 +57,9 @@ struct Serde {
abs_locktime: AbsoluteLockTime,
rel_locktime: RelativeLockTime,
+
+ target: Target,
+ work: Work,
}
impl Serde {
@@ -91,6 +94,9 @@ impl Serde {
seq: Sequence::MAX,
abs_locktime: AbsoluteLockTime::Blocks(Height::MAX),
rel_locktime: RelativeLockTime::Blocks(NumberOfBlocks::MAX),
+
+ target: Target::MAX_ATTAINABLE_MAINNET,
+ work: Target::MAX_ATTAINABLE_MAINNET.to_work()
}
}
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.