Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move txvalidation flag util to internal/pkg from ledger #927

Merged
merged 1 commit into from
Apr 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions common/configtx/test/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
"github.com/hyperledger/fabric/common/flogging"
"github.com/hyperledger/fabric/common/genesis"
"github.com/hyperledger/fabric/core/config/configtest"
"github.com/hyperledger/fabric/core/ledger/util"
"github.com/hyperledger/fabric/internal/configtxgen/encoder"
"github.com/hyperledger/fabric/internal/configtxgen/genesisconfig"
"github.com/hyperledger/fabric/internal/pkg/txflags"
"github.com/hyperledger/fabric/protoutil"
)

Expand All @@ -36,7 +36,7 @@ func MakeGenesisBlock(chainID string) (*cb.Block, error) {
return gb, nil
}

txsFilter := util.NewTxValidationFlagsSetValue(len(gb.Data.Data), peer.TxValidationCode_VALID)
txsFilter := txflags.NewWithValues(len(gb.Data.Data), peer.TxValidationCode_VALID)
gb.Metadata.Metadata[cb.BlockMetadataIndex_TRANSACTIONS_FILTER] = txsFilter

return gb, nil
Expand Down
6 changes: 3 additions & 3 deletions common/ledger/blkstorage/fsblkstorage/blockfile_mgr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/hyperledger/fabric-protos-go/common"
"github.com/hyperledger/fabric-protos-go/peer"
"github.com/hyperledger/fabric/common/ledger/testutil"
ledgerutil "github.com/hyperledger/fabric/core/ledger/util"
"github.com/hyperledger/fabric/internal/pkg/txflags"
"github.com/hyperledger/fabric/protoutil"
"github.com/stretchr/testify/assert"
)
Expand Down Expand Up @@ -209,7 +209,7 @@ func TestBlockfileMgrGetTxByIdDuplicateTxid(t *testing.T) {
},
[]string{"txid-1", "txid-2", "txid-1"},
)
txValidationFlags := ledgerutil.NewTxValidationFlags(3)
txValidationFlags := txflags.New(3)
txValidationFlags.SetFlag(0, peer.TxValidationCode_VALID)
txValidationFlags.SetFlag(1, peer.TxValidationCode_INVALID_OTHER_REASON)
txValidationFlags.SetFlag(2, peer.TxValidationCode_DUPLICATE_TXID)
Expand All @@ -223,7 +223,7 @@ func TestBlockfileMgrGetTxByIdDuplicateTxid(t *testing.T) {
},
[]string{"txid-3", "txid-1"},
)
txValidationFlags = ledgerutil.NewTxValidationFlags(2)
txValidationFlags = txflags.New(2)
txValidationFlags.SetFlag(0, peer.TxValidationCode_VALID)
txValidationFlags.SetFlag(1, peer.TxValidationCode_DUPLICATE_TXID)
block2.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER] = txValidationFlags
Expand Down
4 changes: 2 additions & 2 deletions common/ledger/blkstorage/fsblkstorage/blockindex.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/hyperledger/fabric/common/ledger/blkstorage/fsblkstorage/msgs"
"github.com/hyperledger/fabric/common/ledger/util"
"github.com/hyperledger/fabric/common/ledger/util/leveldbhelper"
ledgerUtil "github.com/hyperledger/fabric/core/ledger/util"
"github.com/hyperledger/fabric/internal/pkg/txflags"
"github.com/pkg/errors"
)

Expand Down Expand Up @@ -90,7 +90,7 @@ func (index *blockIndex) indexBlock(blockIdxInfo *blockIdxInfo) error {
txOffsets := blockIdxInfo.txOffsets
blkNum := blockIdxInfo.blockNum
blkHash := blockIdxInfo.blockHash
txsfltr := ledgerUtil.TxValidationFlags(blockIdxInfo.metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER])
txsfltr := txflags.ValidationFlags(blockIdxInfo.metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER])
batch := leveldbhelper.NewUpdateBatch()
flpBytes, err := flp.marshal()
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions common/ledger/blkstorage/fsblkstorage/blockindex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/hyperledger/fabric/common/ledger/testutil"
commonledgerutil "github.com/hyperledger/fabric/common/ledger/util"
"github.com/hyperledger/fabric/common/metrics/disabled"
"github.com/hyperledger/fabric/core/ledger/util"
"github.com/hyperledger/fabric/internal/pkg/txflags"
"github.com/hyperledger/fabric/protoutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -199,7 +199,7 @@ func testBlockIndexSelectiveIndexing(t *testing.T, indexItems []blkstorage.Index
}

for _, block := range blocks {
flags := util.TxValidationFlags(block.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER])
flags := txflags.ValidationFlags(block.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER])

for idx, d := range block.Data.Data {
txid, err = protoutil.GetOrComputeTxIDFromEnvelope(d)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/hyperledger/fabric-protos-go/peer"
"github.com/hyperledger/fabric/common/ledger/blkstorage"
"github.com/hyperledger/fabric/common/ledger/testutil"
"github.com/hyperledger/fabric/core/ledger/util"
"github.com/hyperledger/fabric/internal/pkg/txflags"
"github.com/hyperledger/fabric/protoutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -95,7 +95,7 @@ func checkBlocks(t *testing.T, expectedBlocks []*common.Block, store blkstorage.

for blockNum := 0; blockNum < len(expectedBlocks); blockNum++ {
block := expectedBlocks[blockNum]
flags := util.TxValidationFlags(block.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER])
flags := txflags.ValidationFlags(block.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER])
retrievedBlock, _ := store.RetrieveBlockByNumber(uint64(blockNum))
assert.Equal(t, block, retrievedBlock)

Expand Down
8 changes: 4 additions & 4 deletions common/ledger/testutil/test_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
"github.com/hyperledger/fabric/bccsp/sw"
"github.com/hyperledger/fabric/common/configtx/test"
"github.com/hyperledger/fabric/common/crypto"
"github.com/hyperledger/fabric/internal/pkg/txflags"

"github.com/hyperledger/fabric/common/ledger/testutil/fakes"
lutils "github.com/hyperledger/fabric/core/ledger/util"
"github.com/hyperledger/fabric/msp"
mspmgmt "github.com/hyperledger/fabric/msp/mgmt"
msptesttools "github.com/hyperledger/fabric/msp/mgmt/testtools"
Expand Down Expand Up @@ -75,7 +75,7 @@ type signingIdentity interface {
func NewBlockGenerator(t *testing.T, ledgerID string, signTxs bool) (*BlockGenerator, *common.Block) {
gb, err := test.MakeGenesisBlock(ledgerID)
assert.NoError(t, err)
gb.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER] = lutils.NewTxValidationFlagsSetValue(len(gb.Data.Data), pb.TxValidationCode_VALID)
gb.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER] = txflags.NewWithValues(len(gb.Data.Data), pb.TxValidationCode_VALID)
return &BlockGenerator{1, protoutil.BlockHeaderHash(gb.GetHeader()), signTxs, t}, gb
}

Expand Down Expand Up @@ -114,7 +114,7 @@ func (bg *BlockGenerator) NextTestBlocks(numBlocks int) []*common.Block {
numTx := 10
for i := 0; i < numBlocks; i++ {
block := bg.NextTestBlock(numTx, 100)
block.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER] = lutils.NewTxValidationFlagsSetValue(numTx, pb.TxValidationCode_VALID)
block.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER] = txflags.NewWithValues(numTx, pb.TxValidationCode_VALID)
blocks = append(blocks, block)
}
return blocks
Expand Down Expand Up @@ -305,7 +305,7 @@ func NewBlock(env []*common.Envelope, blockNum uint64, previousHash []byte) *com
block.Header.DataHash = protoutil.BlockDataHash(block.Data)
protoutil.InitBlockMetadata(block)

block.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER] = lutils.NewTxValidationFlagsSetValue(len(env), pb.TxValidationCode_VALID)
block.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER] = txflags.NewWithValues(len(env), pb.TxValidationCode_VALID)

return block
}
Expand Down
4 changes: 2 additions & 2 deletions core/chaincode/chaincode_support_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ import (
"github.com/hyperledger/fabric/core/ledger/ledgermgmt"
"github.com/hyperledger/fabric/core/ledger/ledgermgmt/ledgermgmttest"
ledgermock "github.com/hyperledger/fabric/core/ledger/mock"
cut "github.com/hyperledger/fabric/core/ledger/util"
"github.com/hyperledger/fabric/core/peer"
"github.com/hyperledger/fabric/core/policy"
policymocks "github.com/hyperledger/fabric/core/policy/mocks"
"github.com/hyperledger/fabric/core/scc"
"github.com/hyperledger/fabric/core/scc/lscc"
"github.com/hyperledger/fabric/internal/pkg/txflags"
"github.com/hyperledger/fabric/msp"
mspmgmt "github.com/hyperledger/fabric/msp/mgmt"
msptesttools "github.com/hyperledger/fabric/msp/mgmt/testtools"
Expand Down Expand Up @@ -1397,7 +1397,7 @@ func endTxSimulation(peerInstance *peer.Peer, channelID string, ccid *pb.Chainco
}
block := protoutil.NewBlock(blockNumber, bcInfo.CurrentBlockHash)
block.Data.Data = [][]byte{envBytes}
txsFilter := cut.NewTxValidationFlagsSetValue(len(block.Data.Data), pb.TxValidationCode_VALID)
txsFilter := txflags.NewWithValues(len(block.Data.Data), pb.TxValidationCode_VALID)
block.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER] = txsFilter

//commit the block
Expand Down
21 changes: 10 additions & 11 deletions core/committer/txvalidator/v14/txvalidator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ import (
ledger2 "github.com/hyperledger/fabric/core/ledger"
"github.com/hyperledger/fabric/core/ledger/ledgermgmt"
"github.com/hyperledger/fabric/core/ledger/ledgermgmt/ledgermgmttest"
"github.com/hyperledger/fabric/core/ledger/util"
ledgerUtil "github.com/hyperledger/fabric/core/ledger/util"
mocktxvalidator "github.com/hyperledger/fabric/core/mocks/txvalidator"
"github.com/hyperledger/fabric/core/mocks/validator"
"github.com/hyperledger/fabric/internal/pkg/txflags"
"github.com/hyperledger/fabric/msp"
mspmgmt "github.com/hyperledger/fabric/msp/mgmt"
msptesttools "github.com/hyperledger/fabric/msp/mgmt/testtools"
Expand Down Expand Up @@ -76,7 +75,7 @@ func testValidationWithNTXes(t *testing.T, ledger ledger2.PeerLedger, gbHash []b

tValidator.Validate(block)

txsfltr := util.TxValidationFlags(block.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER])
txsfltr := txflags.ValidationFlags(block.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER])

for i := 0; i < nBlocks; i++ {
assert.True(t, txsfltr.IsSetTo(i, peer.TxValidationCode_VALID))
Expand All @@ -85,7 +84,7 @@ func testValidationWithNTXes(t *testing.T, ledger ledger2.PeerLedger, gbHash []b

func TestDetectTXIdDuplicates(t *testing.T) {
txids := []string{"", "1", "2", "3", "", "2", ""}
txsfltr := ledgerUtil.NewTxValidationFlags(len(txids))
txsfltr := txflags.New(len(txids))
markTXIdDuplicates(txids, txsfltr)
assert.True(t, txsfltr.IsSetTo(0, peer.TxValidationCode_NOT_VALIDATED))
assert.True(t, txsfltr.IsSetTo(1, peer.TxValidationCode_NOT_VALIDATED))
Expand All @@ -96,7 +95,7 @@ func TestDetectTXIdDuplicates(t *testing.T) {
assert.True(t, txsfltr.IsSetTo(6, peer.TxValidationCode_NOT_VALIDATED))

txids = []string{"", "1", "2", "3", "", "21", ""}
txsfltr = ledgerUtil.NewTxValidationFlags(len(txids))
txsfltr = txflags.New(len(txids))
markTXIdDuplicates(txids, txsfltr)
assert.True(t, txsfltr.IsSetTo(0, peer.TxValidationCode_NOT_VALIDATED))
assert.True(t, txsfltr.IsSetTo(1, peer.TxValidationCode_NOT_VALIDATED))
Expand Down Expand Up @@ -156,15 +155,15 @@ func TestBlockValidationDuplicateTXId(t *testing.T) {
acv.On("ForbidDuplicateTXIdInBlock").Return(false).Once()
tValidator.Validate(block)

txsfltr := util.TxValidationFlags(block.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER])
txsfltr := txflags.ValidationFlags(block.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER])

assert.True(t, txsfltr.IsSetTo(0, peer.TxValidationCode_VALID))
assert.True(t, txsfltr.IsSetTo(1, peer.TxValidationCode_VALID))

acv.On("ForbidDuplicateTXIdInBlock").Return(true)
tValidator.Validate(block)

txsfltr = util.TxValidationFlags(block.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER])
txsfltr = txflags.ValidationFlags(block.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER])

assert.True(t, txsfltr.IsSetTo(0, peer.TxValidationCode_VALID))
assert.True(t, txsfltr.IsSetTo(1, peer.TxValidationCode_DUPLICATE_TXID))
Expand Down Expand Up @@ -286,7 +285,7 @@ func TestTxValidationFailure_InvalidTxid(t *testing.T) {

// Initialize metadata
protoutil.InitBlockMetadata(block)
txsFilter := util.NewTxValidationFlagsSetValue(len(block.Data.Data), peer.TxValidationCode_VALID)
txsFilter := txflags.NewWithValues(len(block.Data.Data), peer.TxValidationCode_VALID)
block.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER] = txsFilter

// Commit block to the ledger
Expand All @@ -296,7 +295,7 @@ func TestTxValidationFailure_InvalidTxid(t *testing.T) {
// because it's already committed
tValidator.Validate(block)

txsfltr := util.TxValidationFlags(block.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER])
txsfltr := txflags.ValidationFlags(block.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER])
assert.True(t, txsfltr.IsInvalid(0))

// We expect the tx to be invalid because of a bad txid
Expand Down Expand Up @@ -393,7 +392,7 @@ func TestInvalidTXsForUpgradeCC(t *testing.T) {
7: {ChannelID: "chain1", ChaincodeName: "cc0", ChaincodeVersion: "v3"},
}

txsfltr := ledgerUtil.NewTxValidationFlags(8)
txsfltr := txflags.New(8)
txsfltr.SetFlag(0, peer.TxValidationCode_VALID)
txsfltr.SetFlag(1, peer.TxValidationCode_VALID)
txsfltr.SetFlag(2, peer.TxValidationCode_VALID)
Expand All @@ -403,7 +402,7 @@ func TestInvalidTXsForUpgradeCC(t *testing.T) {
txsfltr.SetFlag(6, peer.TxValidationCode_VALID)
txsfltr.SetFlag(7, peer.TxValidationCode_VALID)

expectTxsFltr := ledgerUtil.NewTxValidationFlags(8)
expectTxsFltr := txflags.New(8)
expectTxsFltr.SetFlag(0, peer.TxValidationCode_VALID)
expectTxsFltr.SetFlag(1, peer.TxValidationCode_CHAINCODE_VERSION_CONFLICT)
expectTxsFltr.SetFlag(2, peer.TxValidationCode_CHAINCODE_VERSION_CONFLICT)
Expand Down
10 changes: 5 additions & 5 deletions core/committer/txvalidator/v14/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/hyperledger/fabric/core/common/sysccprovider"
"github.com/hyperledger/fabric/core/common/validation"
"github.com/hyperledger/fabric/core/ledger"
ledgerUtil "github.com/hyperledger/fabric/core/ledger/util"
"github.com/hyperledger/fabric/internal/pkg/txflags"
"github.com/hyperledger/fabric/msp"
"github.com/hyperledger/fabric/protoutil"
"github.com/pkg/errors"
Expand Down Expand Up @@ -140,7 +140,7 @@ func (v *TxValidator) Validate(block *common.Block) error {
logger.Debugf("[%s] START Block Validation for block [%d]", v.ChannelID, block.Header.Number)

// Initialize trans as not_validated here, then set invalidation reason code upon invalidation below
txsfltr := ledgerUtil.NewTxValidationFlags(len(block.Data.Data))
txsfltr := txflags.New(len(block.Data.Data))
// txsChaincodeNames records all the invoked chaincodes by tx in a block
txsChaincodeNames := make(map[int]*sysccprovider.ChaincodeInstance)
// upgradedChaincodes records all the chaincodes that are upgraded in a block
Expand Down Expand Up @@ -238,7 +238,7 @@ func (v *TxValidator) Validate(block *common.Block) error {

// allValidated returns error if some of the validation flags have not been set
// during validation
func (v *TxValidator) allValidated(txsfltr ledgerUtil.TxValidationFlags, block *common.Block) error {
func (v *TxValidator) allValidated(txsfltr txflags.ValidationFlags, block *common.Block) error {
for id, f := range txsfltr {
if peer.TxValidationCode(f) == peer.TxValidationCode_NOT_VALIDATED {
return errors.Errorf("transaction %d in block %d has skipped validation", id, block.Header.Number)
Expand All @@ -248,7 +248,7 @@ func (v *TxValidator) allValidated(txsfltr ledgerUtil.TxValidationFlags, block *
return nil
}

func markTXIdDuplicates(txids []string, txsfltr ledgerUtil.TxValidationFlags) {
func markTXIdDuplicates(txids []string, txsfltr txflags.ValidationFlags) {
txidMap := make(map[string]struct{})

for id, txid := range txids {
Expand Down Expand Up @@ -484,7 +484,7 @@ func (v *TxValidator) generateCCKey(ccName, chainID string) string {
}

// invalidTXsForUpgradeCC invalid all txs that should be invalided because of chaincode upgrade txs
func (v *TxValidator) invalidTXsForUpgradeCC(txsChaincodeNames map[int]*sysccprovider.ChaincodeInstance, txsUpgradedChaincodes map[int]*sysccprovider.ChaincodeInstance, txsfltr ledgerUtil.TxValidationFlags) {
func (v *TxValidator) invalidTXsForUpgradeCC(txsChaincodeNames map[int]*sysccprovider.ChaincodeInstance, txsUpgradedChaincodes map[int]*sysccprovider.ChaincodeInstance, txsfltr txflags.ValidationFlags) {
if len(txsUpgradedChaincodes) == 0 {
return
}
Expand Down
10 changes: 5 additions & 5 deletions core/committer/txvalidator/v14/validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ import (
"github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/rwsetutil"
"github.com/hyperledger/fabric/core/ledger/ledgermgmt"
"github.com/hyperledger/fabric/core/ledger/ledgermgmt/ledgermgmttest"
lutils "github.com/hyperledger/fabric/core/ledger/util"
mocktxvalidator "github.com/hyperledger/fabric/core/mocks/txvalidator"
mocks2 "github.com/hyperledger/fabric/discovery/support/mocks"
"github.com/hyperledger/fabric/internal/pkg/txflags"
"github.com/hyperledger/fabric/msp"
"github.com/hyperledger/fabric/msp/mgmt"
msptesttools "github.com/hyperledger/fabric/msp/mgmt/testtools"
Expand Down Expand Up @@ -273,13 +273,13 @@ func putCCInfo(theLedger ledger.PeerLedger, ccname string, policy []byte, t *tes
}

func assertInvalid(block *common.Block, t *testing.T, code peer.TxValidationCode) {
txsFilter := lutils.TxValidationFlags(block.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER])
txsFilter := txflags.ValidationFlags(block.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER])
assert.True(t, txsFilter.IsInvalid(0))
assert.True(t, txsFilter.IsSetTo(0, code))
}

func assertValid(block *common.Block, t *testing.T) {
txsFilter := lutils.TxValidationFlags(block.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER])
txsFilter := txflags.ValidationFlags(block.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER])
assert.False(t, txsFilter.IsInvalid(0))
}

Expand Down Expand Up @@ -729,7 +729,7 @@ func TestParallelValidation(t *testing.T) {
assert.NoError(t, err)

// Block metadata array position to store serialized bit array filter of invalid transactions
txsFilter := lutils.TxValidationFlags(b.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER])
txsFilter := txflags.ValidationFlags(b.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER])
// tx validity
for txNum := 0; txNum < txCnt; txNum += 1 {
switch uint(txNum / 10) {
Expand Down Expand Up @@ -1773,7 +1773,7 @@ func TestDuplicateTxId(t *testing.T) {
assertion.NoError(err)

// We expect the tx to be invalid because of a duplicate txid
txsfltr := lutils.TxValidationFlags(b.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER])
txsfltr := txflags.ValidationFlags(b.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER])
assertion.True(txsfltr.IsInvalid(0))
assertion.True(txsfltr.Flag(0) == peer.TxValidationCode_DUPLICATE_TXID)
}
Expand Down
Loading