-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incentives: Heartbeat Transaction Support #548
Conversation
re_enc = encoding.msgpack_encode(encoding.msgpack_decode(enc)) | ||
self.assertEqual(enc, re_enc) | ||
|
||
self.assertEqual(transaction.HeartbeatTxn.undictify(hb.dictify()), hb) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we used to have so-called "golden" tests - txn created by algod in base64 decoded in a test and some fields compared, serialized back and compared back to golden
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was following the pattern already here. I think I see some of those golden tests in indexer, thought it was message-pack encoded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I'll add sdk-testing test case as a followup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added support in latest push.
…nd. Implement cross-SDK test-cases.
@@ -405,6 +405,25 @@ def test_stateproof_txn(self): | |||
encoding.msgpack_encode(encoding.msgpack_decode(stateprooftxn)), | |||
) | |||
|
|||
def test_heartbeat_txn(self): | |||
heartbeattxn = ( | |||
"hqJmdmqiZ2jEIDluDCudpBECh7Xg6253Qe2hY3T/SbzZSPR2Hn4Nlmw4omhihaFhxCC" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe to use the same golden as in other SDK test for consistency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think they have to match, but this is one we also use in indexer API tests, kind of like it being separate from the cross-SDK ones.
No description provided.