Log sent tx ids to debug.
While here, add createdTx to unmined pool for 'sendfrom' commands as well, instead of just 'sendmany'.
This commit is contained in:
parent
3cd9a96dc7
commit
cdd9bea5db
1 changed files with 8 additions and 0 deletions
|
@ -429,6 +429,13 @@ func SendFrom(reply chan []byte, msg *btcjson.Message) {
|
|||
w.UtxoStore.Unlock()
|
||||
}
|
||||
|
||||
// Add hex string of raw tx to sent tx pool. If future blocks
|
||||
// do not contain a tx, a resend is attempted.
|
||||
UnminedTxs.Lock()
|
||||
UnminedTxs.m[TXID(result.(string))] = createdTx
|
||||
UnminedTxs.Unlock()
|
||||
|
||||
log.Debugf("sent transaction %v", result)
|
||||
ReplySuccess(reply, msg.Id, result)
|
||||
|
||||
// TODO(jrick): If message succeeded in being sent, save the
|
||||
|
@ -602,6 +609,7 @@ func SendMany(reply chan []byte, msg *btcjson.Message) {
|
|||
UnminedTxs.m[TXID(result.(string))] = createdTx
|
||||
UnminedTxs.Unlock()
|
||||
|
||||
log.Debugf("sent transaction %v", result)
|
||||
ReplySuccess(reply, msg.Id, result)
|
||||
|
||||
// TODO(jrick): If message succeeded in being sent, save the
|
||||
|
|
Loading…
Add table
Reference in a new issue