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

When forking chain, Tx nonce should be set #309

Closed
earlbread opened this issue Jun 28, 2019 · 1 comment
Closed

When forking chain, Tx nonce should be set #309

earlbread opened this issue Jun 28, 2019 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@earlbread
Copy link
Contributor

After #307, Tx nonce is not set except signersToStrip addresses.
Reproduce scenario is below:

var privateKey1 = new PrivateKey();
var privateKey2 = new PrivateKey();

var address1 = privateKey1.PublicKey.ToAddress();
var address2 = privateKey2.PublicKey.ToAddress();

_blockChain.MineBlock(address1);

_blockChain.MakeTransaction(privateKey1, new[] { new DumbAction() });
Block<DumbAction> branchPoint = _blockChain.MineBlock(address1);

_blockChain.MakeTransaction(privateKey2, new[] { new DumbAction() });
_blockChain.MineBlock(address2);

BlockChain<DumbAction> forked = _blockChain.Fork(branchPoint.Hash);
Assert.Equal(1, forked.GetNextTxNonce(address1));
@earlbread earlbread added the bug Something isn't working label Jun 28, 2019
@earlbread earlbread added this to the 0.4.0 milestone Jun 28, 2019
@dahlia dahlia self-assigned this Jun 28, 2019
@dahlia
Copy link
Contributor

dahlia commented Jun 28, 2019

I'm going to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants