OSDN Git Service
(root)
/
bytom
/
bytom.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2cdbaaf
)
fix coinbase fee bug (#1642)
author
Chengcheng Zhang
<943420582@qq.com>
Tue, 19 Mar 2019 09:43:34 +0000
(17:43 +0800)
committer
Paladz
<yzhu101@uottawa.ca>
Tue, 19 Mar 2019 09:43:34 +0000
(17:43 +0800)
* fix coinbase fee bug
* update
* update
blockchain/txbuilder/finalize.go
patch
|
blob
|
history
diff --git
a/blockchain/txbuilder/finalize.go
b/blockchain/txbuilder/finalize.go
index
1f777fc
..
f2c36af
100644
(file)
--- a/
blockchain/txbuilder/finalize.go
+++ b/
blockchain/txbuilder/finalize.go
@@
-136,7
+136,10
@@
func CalculateTxFee(tx *types.Tx) (fee uint64) {
totalOutputBTM := uint64(0)
for _, input := range tx.Inputs {
- if input.InputType() != types.CoinbaseInputType && input.AssetID() == *consensus.BTMAssetID {
+ if input.InputType() == types.CoinbaseInputType {
+ return 0
+ }
+ if input.AssetID() == *consensus.BTMAssetID {
totalInputBTM += input.Amount()
}
}