mempool: Correct cmd field for rejected txns.

This commit corrects an issue where the reject message sent in response
to rejected transactions had the Cmd field set to "block" instead of
"tx".

Fixes #436.
This commit is contained in:
Dave Collins 2015-05-24 16:29:14 -05:00
parent d9556df292
commit 9350b939bc

View file

@ -499,7 +499,7 @@ func (b *blockManager) handleTxMsg(tmsg *txMsg) {
// Convert the error into an appropriate reject message and
// send it.
code, reason := errToRejectErr(err)
tmsg.peer.PushRejectMsg(wire.CmdBlock, code, reason, txHash,
tmsg.peer.PushRejectMsg(wire.CmdTx, code, reason, txHash,
false)
return
}