Page MenuHomePhabricator

[Chronik] Add `TxId::new` and `TxId::hash`
ClosedPublic

Authored by tobias_ruck on Dec 19 2023, 23:13.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC3e4a4bb8d4e9: [Chronik] Add `TxId::new` and `TxId::hash`
Summary

Helpers when dealing with txids.

Depends on D15007.

Test Plan

cargo test -p bitcoinsuite-core

Diff Detail

Repository
rABC Bitcoin ABC
Branch
chronik-bitcoinsuite-txid-methods
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26000
Build 51574: Build Diffbuild-chronik · chronik-client-integration-tests
Build 51573: arc lint + arc unit

Event Timeline

PiRK added inline comments.
chronik/bitcoinsuite-core/src/tx/txid.rs
51

In D15012 I see that you are using TxId::from. Is this different?

chronik/bitcoinsuite-core/src/tx/txid.rs
51

TxId::from and TxId::new are the same except new can be used in a const context, as in the doctest of new

This revision is now accepted and ready to land.Dec 20 2023, 11:55