Skip to content

Commit 8a67990

Browse files
committed
Fix Migrate4to5 for very old contracts
1 parent d321206 commit 8a67990

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

x/compute/internal/types/types.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,13 @@ var ZeroSender = sdk.AccAddress{
334334
}
335335

336336
func (c ContractInfo) InitialHistory(initMsg []byte) ContractCodeHistoryEntry {
337+
if c.Created == nil {
338+
c.Created = &AbsoluteTxPosition{
339+
BlockHeight: 0,
340+
TxIndex: 0,
341+
}
342+
}
343+
337344
return ContractCodeHistoryEntry{
338345
Operation: ContractCodeHistoryOperationTypeInit,
339346
CodeID: c.CodeID,

0 commit comments

Comments
 (0)