go-blockchain/chain
Claude 70fab6f7d0
Some checks failed
Test / Test (push) Failing after 16s
Security Scan / security (push) Failing after 13m58s
fix: restore HF5 asset tags, HTLC/multisig inputs, and tx version check after conventions sweep
The conventions sweep (71f0a5c) overwrote HF5 code and removed HTLC/multisig
input handling. This commit restores:

- wire: HF5 asset wire tags (40/49/50/51) and reader functions for
  asset_descriptor_operation, asset_operation_proof,
  asset_operation_ownership_proof, and asset_operation_ownership_proof_eth
- wire: HTLC and multisig input encode/decode with string field helpers
- consensus: checkTxVersion enforcing version 3 after HF5 / rejecting before
- consensus: HF1-gated acceptance of HTLC and multisig input/output types
- consensus: HTLC key image deduplication in checkKeyImages
- consensus: HTLC ring signature counting in verifyV1Signatures
- chain: corrected error assertion in TestChain_GetBlockByHeight_NotFound

All 14 packages pass go test -race ./...

Co-Authored-By: Charon <charon@lethean.io>
2026-03-16 21:32:33 +00:00
..
chain.go refactor: replace fmt.Errorf/os.* with go-io/go-log conventions 2026-03-16 21:17:49 +00:00
chain_test.go fix: restore HF5 asset tags, HTLC/multisig inputs, and tx version check after conventions sweep 2026-03-16 21:32:33 +00:00
difficulty.go fix(chain): gate difficulty target switch on HF6, not HF2 2026-03-16 20:47:56 +00:00
difficulty_test.go fix(chain): gate difficulty target switch on HF6, not HF2 2026-03-16 20:47:56 +00:00
history.go fix(chain): use genesis hash in sparse history for empty chain 2026-02-21 21:31:55 +00:00
history_test.go fix(chain): use genesis hash in sparse history for empty chain 2026-02-21 21:31:55 +00:00
index.go refactor: replace fmt.Errorf/os.* with go-io/go-log conventions 2026-03-16 21:17:49 +00:00
integration_test.go fix(difficulty): correct LWMA algorithm and hardfork-aware target 2026-02-21 22:32:57 +00:00
levinconn.go refactor: replace fmt.Errorf/os.* with go-io/go-log conventions 2026-03-16 21:17:49 +00:00
meta.go feat(chain): go-store dependency and metadata types 2026-02-20 21:42:22 +00:00
p2psync.go refactor: replace fmt.Errorf/os.* with go-io/go-log conventions 2026-03-16 21:17:49 +00:00
p2psync_test.go feat(chain): add P2P sync state machine 2026-02-21 21:00:57 +00:00
ring.go refactor: replace fmt.Errorf/os.* with go-io/go-log conventions 2026-03-16 21:17:49 +00:00
ring_test.go feat(chain): add GetRingOutputs callback for signature verification 2026-02-21 20:28:54 +00:00
store.go refactor: replace fmt.Errorf/os.* with go-io/go-log conventions 2026-03-16 21:17:49 +00:00
sync.go refactor: replace fmt.Errorf/os.* with go-io/go-log conventions 2026-03-16 21:17:49 +00:00
sync_test.go fix(chain): mark ZC input key images as spent during sync 2026-02-21 20:36:00 +00:00
validate.go refactor: replace fmt.Errorf/os.* with go-io/go-log conventions 2026-03-16 21:17:49 +00:00
validate_test.go feat(chain): block header validation (linkage, height, size) 2026-02-20 21:50:12 +00:00