Page MenuHomePhabricator

Merge #14307: Consolidate redundant implementations of ParseHashStr
ClosedPublic

Authored by nakihito on Feb 15 2020, 00:30.

Details

Summary

9c5af58d51 Consolidate redundant implementations of ParseHashStr (Ben Woosley)

Pull request description:

This change:
* adds a length check to all calls to `ParseHashStr`, appropriate given its use to populate
  a 256-bit number from a hex str
* allows the caller to handle the failure, which allows for the more
  appropriate `JSONRPCError` on failure in `prioritisetransaction` rpc

Relative to #14288

Tree-SHA512: baa791147e5ceb3c30c70df3981aaf807bf7d4a90a0be3625540b59aa4b9a9d303a452bfef18bf167cbb833ef9591b4ef5948bf4a1ce67b421d804ae8d20ea53

Backport of Core PR14307
https://github.com/bitcoin/bitcoin/pull/14307/

Depends on D5294

Test Plan
ninja check
ninja check-functional

Diff Detail

Repository
rABC Bitcoin ABC
Branch
PR14307
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 9508
Build 16928: Default Diff Build & Tests
Build 16927: arc lint + arc unit

Event Timeline

Owners added a reviewer: Restricted Owners Package.Feb 15 2020, 00:30

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those Bitcoin Core PRs have been inserted into the summary for reference.

This revision is now accepted and ready to land.Feb 17 2020, 12:05