Commit d6b85865 authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

ctc: less calls (#205)

parent 936d9986
......@@ -177,9 +177,11 @@ contract OVM_CanonicalTransactionChain is iOVM_CanonicalTransactionChain, Lib_Ad
Lib_OVMCodec.QueueElement memory _element
)
{
iOVM_ChainStorageContainer queue = queue();
uint40 trueIndex = uint40(_index * 2);
bytes32 queueRoot = queue().get(trueIndex);
bytes32 timestampAndBlockNumber = queue().get(trueIndex + 1);
bytes32 queueRoot = queue.get(trueIndex);
bytes32 timestampAndBlockNumber = queue.get(trueIndex + 1);
uint40 elementTimestamp;
uint40 elementBlockNumber;
......@@ -293,12 +295,14 @@ contract OVM_CanonicalTransactionChain is iOVM_CanonicalTransactionChain, Lib_Ad
timestampAndBlockNumber := or(timestampAndBlockNumber, shl(40, number()))
}
queue().push2(
iOVM_ChainStorageContainer queue = queue();
queue.push2(
transactionHash,
timestampAndBlockNumber
);
uint256 queueIndex = queue().length() / 2;
uint256 queueIndex = queue.length() / 2;
emit TransactionEnqueued(
msg.sender,
_target,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment