You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(api): verify visible flag in printBlockToJSON
Add two regression tests that pin the optimized printBlockToJSON path
against the visible=true/false semantics of the prior implementation,
which the field-by-field assembly now has to thread through JsonFormat
explicitly.
- testPrintBlockToJSONVisibleFalse: assert structural invariants
(blockID, block_header, transactions) under visible=false, mirroring
the existing visible=true cases.
- testPrintBlockToJSONVisibleFlagAffectsAddressEncoding: build a block
with a mainnet 0x41-prefixed witness_address and assert
- blockID is identical under either flag (byte-level hash),
- block_header JSON differs between the two (witness_address is
re-encoded), and
- visible=true renders witness_address as Base58 ("T...") while
visible=false does not.
0 commit comments