Skip to content

Commit

Permalink
update util func
Browse files Browse the repository at this point in the history
  • Loading branch information
sainoe committed Nov 10, 2023
1 parent 774ff99 commit 52a9421
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions testutil/crypto/evidence.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,14 @@ func UpdateHeaderCommitWithNilVotes(header *ibctmtypes.Header, validators []*tmt
for _, v := range validators {
// get validator index in valset
idx, _ := valset.GetByAddress(v.Address)
s := commit.Signatures[idx]
// change BlockIDFlag to nil
s.BlockIDFlag = tmtypes.BlockIDFlagNil
// update the signatures
commit.Signatures[idx] = s
if idx != -1 {
// get validator commit sig
s := commit.Signatures[idx]
// change BlockIDFlag to nil
s.BlockIDFlag = tmtypes.BlockIDFlagNil
// update the signatures
commit.Signatures[idx] = s
}
}

// update the commit in client the header
Expand Down

0 comments on commit 52a9421

Please sign in to comment.