|
|
@ -242,7 +242,7 @@ func processStressTestCommand() { |
|
|
|
var receiverState *AccountState |
|
|
|
var receiverState *AccountState |
|
|
|
var retry uint32 |
|
|
|
var retry uint32 |
|
|
|
|
|
|
|
|
|
|
|
for i := 0; i < 10; i++ { |
|
|
|
for i := 0; ; i++ { |
|
|
|
for retry = 0; retry < 10; retry++ { |
|
|
|
for retry = 0; retry < 10; retry++ { |
|
|
|
shardIDToAccountStateSender = FetchBalance(senderAddress) |
|
|
|
shardIDToAccountStateSender = FetchBalance(senderAddress) |
|
|
|
shardIDToAccountStateReceiver = FetchBalance(receiverAddress) |
|
|
|
shardIDToAccountStateReceiver = FetchBalance(receiverAddress) |
|
|
@ -273,6 +273,11 @@ func processStressTestCommand() { |
|
|
|
fmt.Printf("\nsender: balance (shard %d: %s, nonce: %v)\n", shardID, convertBalanceIntoReadableFormat(senderBalance), senderState.nonce) |
|
|
|
fmt.Printf("\nsender: balance (shard %d: %s, nonce: %v)\n", shardID, convertBalanceIntoReadableFormat(senderBalance), senderState.nonce) |
|
|
|
fmt.Printf("receiver balance (shard %d: %s, nonce: %v)\n", shardID, convertBalanceIntoReadableFormat(receiverBalance), receiverState.nonce) |
|
|
|
fmt.Printf("receiver balance (shard %d: %s, nonce: %v)\n", shardID, convertBalanceIntoReadableFormat(receiverBalance), receiverState.nonce) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// stop stress testing here after printing out the final balance
|
|
|
|
|
|
|
|
if i == 10 { |
|
|
|
|
|
|
|
break |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
tx := types.NewTransaction( |
|
|
|
tx := types.NewTransaction( |
|
|
|
senderState.nonce, receiverAddress, uint32(shardID), amountBigInt, |
|
|
|
senderState.nonce, receiverAddress, uint32(shardID), amountBigInt, |
|
|
|
gasLimit, gasPriceBigInt, data) |
|
|
|
gasLimit, gasPriceBigInt, data) |
|
|
|