From 79620c1e47c6402aee5d58983d143569854616ad Mon Sep 17 00:00:00 2001 From: Tristen Blakely Date: Fri, 4 Aug 2023 23:01:57 +0000 Subject: [PATCH] fix custodian check for mint transaction validation --- kernel/mint.go | 2 +- rpc/consensus_test.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/mint.go b/kernel/mint.go index 329691eea..af65e6f8f 100644 --- a/kernel/mint.go +++ b/kernel/mint.go @@ -391,7 +391,7 @@ func (node *Node) validateMintSnapshot(snap *common.Snapshot, tx *common.Version } var signed *common.VersionedTransaction - cur, err := node.persistStore.ReadCustodian(snap.Timestamp) + cur, err := node.persistStore.ReadCustodian(timestamp) if err != nil { panic(err) } diff --git a/rpc/consensus_test.go b/rpc/consensus_test.go index 3b9cf9320..34d5a8e28 100644 --- a/rpc/consensus_test.go +++ b/rpc/consensus_test.go @@ -195,6 +195,9 @@ func testConsensus(t *testing.T, snapVersionMint int) { mints := testListMintDistributions(nodes[0].Host) require.Len(mints, 0) + logger.SetLevel(logger.ERROR) + logger.SetFilter("(?i)mint") + kernel.TestMockDiff((config.KernelMintTimeBegin + 24) * time.Hour) tl, _ = testVerifySnapshots(require, nodes) require.Equal(transactionsCount, len(tl))