Save index from tx notifications to utxo store.
This commit is contained in:
parent
2d5950299f
commit
79d1491ac4
1 changed files with 6 additions and 0 deletions
6
cmd.go
6
cmd.go
|
@ -273,6 +273,11 @@ func (w *BtcWallet) ReqNewTxsForAddress(addr string) {
|
|||
log.Error("Tx Handler: Unspecified transaction hash.")
|
||||
return false
|
||||
}
|
||||
index, ok := v["index"].(float64)
|
||||
if !ok {
|
||||
log.Error("Tx Handler: Unspecified transaction index.")
|
||||
return false
|
||||
}
|
||||
amt, ok := v["amount"].(float64)
|
||||
if !ok {
|
||||
log.Error("Tx Handler: Unspecified amount.")
|
||||
|
@ -321,6 +326,7 @@ func (w *BtcWallet) ReqNewTxsForAddress(addr string) {
|
|||
Height: int64(height),
|
||||
}
|
||||
copy(u.Out.Hash[:], txhash[:])
|
||||
u.Out.Index = uint32(index)
|
||||
copy(u.Addr[:], receiver)
|
||||
|
||||
w.UtxoStore.Lock()
|
||||
|
|
Loading…
Reference in a new issue