Skip to content

Commit 4072520

Browse files
authored
[eth] Update accumulator deserialization (#838)
1 parent 315fd41 commit 4072520

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

target_chains/ethereum/contracts/contracts/pyth/PythAccumulator.sol

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,11 @@ abstract contract PythAccumulator is PythGetters, PythSetters, AbstractPyth {
159159
revert PythErrors.InvalidUpdateData();
160160

161161
// This field is not used
162-
// uint32 storageIndex = UnsafeBytesLib.toUint32(encodedPayload, payloadoffset);
162+
// uint64 slot = UnsafeBytesLib.toUint64(encodedPayload, payloadoffset);
163+
payloadoffset += 8;
164+
165+
// This field is not used
166+
// uint32 ringSize = UnsafeBytesLib.toUint32(encodedPayload, payloadoffset);
163167
payloadoffset += 4;
164168

165169
digest = bytes20(

target_chains/ethereum/contracts/forge-test/utils/PythTestUtils.t.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ abstract contract PythTestUtils is Test, WormholeTestUtils {
124124
bytes memory wormholePayload = abi.encodePacked(
125125
uint32(0x41555756), // PythAccumulator.ACCUMULATOR_WORMHOLE_MAGIC
126126
uint8(PythAccumulator.UpdateType.WormholeMerkle),
127-
uint32(0), // Storage index, not used in target networks
127+
uint64(0), // Slot, not used in target networks
128+
uint32(0), // Ring size, not used in target networks
128129
rootDigest
129130
);
130131

0 commit comments

Comments
 (0)