mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-02-10 00:13:09 +00:00
fix nonce in circuit
This commit is contained in:
parent
96ca181f2d
commit
f2a7c574e5
@ -54,13 +54,15 @@ fn main() {
|
|||||||
for i in 0..n_accounts {
|
for i in 0..n_accounts {
|
||||||
match visibility_mask[i] {
|
match visibility_mask[i] {
|
||||||
0 => {
|
0 => {
|
||||||
|
// Public account
|
||||||
|
public_pre_states.push(pre_states[i].clone());
|
||||||
|
|
||||||
let mut post = post_states[i].clone();
|
let mut post = post_states[i].clone();
|
||||||
|
post.nonce += 1;
|
||||||
if post.program_owner == DEFAULT_PROGRAM_ID {
|
if post.program_owner == DEFAULT_PROGRAM_ID {
|
||||||
// Claim account
|
// Claim account
|
||||||
post.program_owner = program_id;
|
post.program_owner = program_id;
|
||||||
}
|
}
|
||||||
// Public account
|
|
||||||
public_pre_states.push(pre_states[i].clone());
|
|
||||||
public_post_states.push(post);
|
public_post_states.push(post);
|
||||||
}
|
}
|
||||||
1 | 2 => {
|
1 | 2 => {
|
||||||
|
|||||||
@ -136,7 +136,8 @@ mod tests {
|
|||||||
let expected_sender_post = Account {
|
let expected_sender_post = Account {
|
||||||
program_owner: program.id(),
|
program_owner: program.id(),
|
||||||
balance: 100 - balance_to_move,
|
balance: 100 - balance_to_move,
|
||||||
..Account::default()
|
nonce: 1,
|
||||||
|
data: vec![],
|
||||||
};
|
};
|
||||||
|
|
||||||
let expected_recipient_post = Account {
|
let expected_recipient_post = Account {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user