Skip to content

void test_modifyTimestamp(int _timestamp) #10

@winsvega

Description

@winsvega

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions