HomePhabricator

Fix RPC signrawtransaction silently accepting missing amount field, make it…

Description

Fix RPC signrawtransaction silently accepting missing amount field, make it throw an error instead

Summary:
After hard fork, replay protected tx's require the amount field to be non-zero for previous outputs in signed tx's. JSON RPC code was accepting transactions with this field missing when it should have been throwing an error. Users had the impression the transaction that was signed was good, but when trying to sent to network, they would get an error that the tx is bad. See github issue https://github.com/Bitcoin-ABC/bitcoin-abc/issues/63.

Depends on D448

Test Plan:
Depends on D448

make check and also rpc-tests.py

Reviewers: #bitcoin_abc, sickpig, freetrader, dgenr8, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D449

Details

Provenance
CCulianuAuthored on Aug 10 2017, 11:33
CCulianuPushed on Aug 10 2017, 11:38
Reviewer
Restricted Project
Differential Revision
D449: Fix RPC signrawtransaction silently accepting missing amount field, make it throw an error instead
Parents
rABCd68e7e48547c: Peer preferentially with NODE_CASH nodes
Branches
Unknown
Tags
Unknown