Fix wallet RPC race by waiting for callbacks in sendrawtransaction
Summary:
This is partial backport of Core PR10286 : https://github.com/bitcoin/bitcoin/pull/10286/commits/cb06edf938302166030db19017c27889ea5b10b6
This patch was merged with the following bug fix:
Fix sendrawtransaction hang when sending a tx already in mempool
This is a backport of Core PR11738 : https://github.com/bitcoin/bitcoin/pull/11738
Test Plan:
make check ./test/functional/test_runner.py --extended
Reviewers: #bitcoin_abc, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Subscribers: jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D3165