OSDN Git Service

fix pssue
authorpaladz <colt@ColtdeMacBook-Pro.local>
Thu, 5 Aug 2021 14:59:55 +0000 (22:59 +0800)
committerpaladz <colt@ColtdeMacBook-Pro.local>
Thu, 5 Aug 2021 14:59:55 +0000 (22:59 +0800)
protocol/validation/block.go

index 65fdfb0..e9938c6 100644 (file)
@@ -43,10 +43,6 @@ func checkCoinbaseTx(b *bc.Block, rewards []state.CoinbaseReward) error {
        }
 
        tx := b.Transactions[0]
-       if len(tx.TxHeader.ResultIds) != len(rewards)+1 {
-               return errors.Wrapf(ErrWrongCoinbaseTransaction, "dismatch number of outputs, got:%d, want:%d", len(tx.TxHeader.ResultIds), len(rewards))
-       }
-
        var rewardAmount, coinbaseAmount uint64
        for _, output := range tx.TxHeader.ResultIds {
                out, err := tx.IntraChainOutput(*output)