Use negative fees with listtransaction result types.
This matches Bitcoin Core Wallet. Fixes #272.
This commit is contained in:
parent
41b7d4c5ee
commit
736a46ff81
1 changed files with 4 additions and 1 deletions
|
@ -870,7 +870,10 @@ func ListTransactions(details *wtxmgr.TxDetails, syncHeight int32, net *chaincfg
|
|||
for _, output := range details.MsgTx.TxOut {
|
||||
outputTotal += btcutil.Amount(output.Value)
|
||||
}
|
||||
feeF64 = (debitTotal - outputTotal).ToBTC()
|
||||
// Note: The actual fee is debitTotal - outputTotal. However,
|
||||
// this RPC reports negative numbers for fees, so the inverse
|
||||
// is calculated.
|
||||
feeF64 = (outputTotal - debitTotal).ToBTC()
|
||||
}
|
||||
|
||||
outputs:
|
||||
|
|
Loading…
Add table
Reference in a new issue