Skip to content

Commit 69085d2

Browse files
author
Jeff Yanta
committed
Fix MemoryAccountWithData Unmarshal for nonce layout
1 parent 27d6adc commit 69085d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/solana/cvm/accounts_memory_account.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func (obj *MemoryAccountWithData) Unmarshal(data []byte) error {
9898
getSimpleMemoryAllocator(data, &obj.Data, capacity, itemSize, &offset)
9999
case MemoryLayoutNonce:
100100
capacity := CompactStateItems
101-
itemSize := int(GetVirtualAccountSizeInMemory(VirtualDurableNonceSize))
101+
itemSize := int(GetVirtualAccountSizeInMemory(VirtualAccountTypeDurableNonce))
102102
if len(data) < MemoryAccountSize+GetSimpleMemoryAllocatorSize(capacity, itemSize) {
103103
return ErrInvalidAccountData
104104
}

0 commit comments

Comments
 (0)