From bb9512488e9a4bde9eb27a99b5677e69b1b5f0ee Mon Sep 17 00:00:00 2001 From: SourceLink Date: Thu, 17 Oct 2024 01:32:26 +0800 Subject: [PATCH] fix get proof (#302) --- node/execution/intrinsics/token/token_execution_engine.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/node/execution/intrinsics/token/token_execution_engine.go b/node/execution/intrinsics/token/token_execution_engine.go index fda191a..4c9000d 100644 --- a/node/execution/intrinsics/token/token_execution_engine.go +++ b/node/execution/intrinsics/token/token_execution_engine.go @@ -321,14 +321,14 @@ func NewTokenExecutionEngine( if err == nil { for _, proof := range proofs { if proof.IndexProof != nil && len(proof.IndexProof) != 0 { - if proof.Index < inc { + if proof.Difficulty < inc { _, par, input, output, err := dataProofStore.GetDataTimeProof( pubSub.GetPeerID(), - proof.Index-1, + proof.Difficulty-1, ) if err == nil { p := []byte{} - p = binary.BigEndian.AppendUint32(p, proof.Index-1) + p = binary.BigEndian.AppendUint32(p, proof.Difficulty-1) p = binary.BigEndian.AppendUint32(p, par) p = binary.BigEndian.AppendUint64( p,