Skip to content
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

void test_modifyTimestamp(int _timestamp) #10

Closed
winsvega opened this issue Mar 2, 2018 · 1 comment
Closed

void test_modifyTimestamp(int _timestamp) #10

winsvega opened this issue Mar 2, 2018 · 1 comment

Comments

@winsvega
Copy link
Collaborator

winsvega commented Mar 2, 2018

void test_modifyTimestamp(int _timestamp)

As some transactions execute TIMESTAMP opcode it is needed to set the timestamp of the current block that is being mined with that transaction so that a transaction could calculate the desired TIMESTAMP value;

The RPC call sequence is following:

session.test_modifyTimestamp(a.convert_to<size_t>());
session.test_addTransaction(tr.transaction.getData().asJson());
session.test_mineBlocks(1);

First set the timestamp of the current block. Then calculate some transaction with that timestamp.
Then finish and calculate the post state hash of a new block.

*This is basically needed to check that TIMESTAMP related tests has a determined results. But is might be not a good solution so far. A disscussion is welcome.

@winsvega
Copy link
Collaborator Author

winsvega commented Sep 1, 2019

@winsvega winsvega closed this as completed Sep 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant