handshake-org / handshake-org/hsd
"Attempting to broadcast anyway" must die
- Dominant language
- JavaScript
- Stars
- 2.1k
- Forks
- 306
- PR merge metrics
- No merged PRs in 30d
Description
My least favorite snippet from hsd and bcoin:
https://github.com/handshake-org/hsd/blob/e270b8cef3f4552c35f744d04594ebe8896d5141/lib/node/fullnode.js#L337-L348
There is no reason why a full node should broadcast a transaction that fails it's own mempool acceptance policy.
Users sending a transaction with `sendrawtransaction` or `broadcast` commands will have no idea their transaction is invalid.
We should also probably provide a an `rpc testmempoolaccept` command like Bitcoin's. It would be extra cool if the SPV node function even waited a second or two to catch any reject messages from peers -- that would be somewhat unreliable but still potentially useful.
Contributor guide
Assessment
This issue has not been assessed yet.