OSDN Git Service

duplicate_submit_no_error (#547)
authorPoseidon <shenao.78@163.com>
Mon, 21 Sep 2020 05:46:30 +0000 (13:46 +0800)
committerGitHub <noreply@github.com>
Mon, 21 Sep 2020 05:46:30 +0000 (13:46 +0800)
protocol/tx.go

index 1206916..55800fe 100644 (file)
@@ -29,7 +29,7 @@ func (c *Chain) ValidateTx(tx *types.Tx) (bool, error) {
 
        bh := c.BestBlockHeader()
        isOrphan, err := c.validateTx(tx, bh)
-       if err == nil {
+       if err == nil && !isOrphan {
                c.markTransactions(tx)
        }
        return isOrphan, err