Skip to content

Commit 61bc7a0

Browse files
author
Dreamer
authored
only export htlc with state=open (#327)
1 parent d31c067 commit 61bc7a0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/htlc/genesis.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState {
100100
k.IterateHTLCs(
101101
ctx,
102102
func(_ tmbytes.HexBytes, h types.HTLC) (stop bool) {
103-
htlcs = append(htlcs, h)
103+
if h.State == types.Open {
104+
htlcs = append(htlcs, h)
105+
}
104106
return false
105107
},
106108
)

0 commit comments

Comments
 (0)