Skip to content

Commit 77a79e8

Browse files
committed
Since the Seoul protocol, reveal operations require the presence of a boolean for whether or not the proof field is present. This is required when manually forging bytes. Added.
1 parent 5afbb3e commit 77a79e8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Tezos/Forging.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ Data forgeOperation(const Proto::Operation& operation) {
179179
append(forged, forgedGasLimit);
180180
append(forged, forgedStorageLimit);
181181
append(forged, forgedPublicKey);
182+
forged.push_back(0x00); // presence_of_proof = false (no proof for non-tz4)
182183
return forged;
183184
}
184185

tests/chains/Tezos/ForgingTests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ TEST(TezosTransaction, forgeReveal) {
226226
revealOperation.set_kind(TW::Tezos::Proto::Operation::REVEAL);
227227
revealOperation.set_allocated_reveal_operation_data(revealOperationData);
228228

229-
auto expected = "6b0081faa75f741ef614b0e35fcc8c90dfa3b0b95721f80992f001f44e810200429a986c8072a40a1f3a3e2ab5a5819bb1b2fb69993c5004837815b9dc55923e";
229+
auto expected = "6b0081faa75f741ef614b0e35fcc8c90dfa3b0b95721f80992f001f44e810200429a986c8072a40a1f3a3e2ab5a5819bb1b2fb69993c5004837815b9dc55923e00";
230230
auto serialized = forgeOperation(revealOperation);
231231

232232
ASSERT_EQ(hex(serialized), expected);

0 commit comments

Comments
 (0)