Skip to content

Commit

Permalink
Merge pull request #14 from FairBlock/fix/encrypted-tx-not-removed
Browse files Browse the repository at this point in the history
Fix encrypted tx not removed after execution
  • Loading branch information
ap0calypse644 authored Jun 13, 2023
2 parents 2e45da4 + 7cdd6d2 commit 4062213
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/pep/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) {
am.keeper.Logger(ctx).Info(skPoint.String())

for _, eachTx := range arr.EncryptedTx {
am.keeper.RemoveEncryptedTx(ctx, eachTx.TargetHeight, eachTx.Index)

if currentNonce, found := am.keeper.GetPepNonce(ctx, eachTx.Creator); found && currentNonce.Nonce == math.MaxUint64 {
am.keeper.Logger(ctx).Error("Invalid PEP Nonce")
Expand Down Expand Up @@ -516,6 +515,8 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) {
),
)
}

am.keeper.RemoveAllEncryptedTxFromHeight(ctx, h)
}

}
Expand Down

0 comments on commit 4062213

Please sign in to comment.