-
Notifications
You must be signed in to change notification settings - Fork 204
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
Bugs/en 3228 sc processor refund gas #321
Bugs/en 3228 sc processor refund gas #321
Conversation
…an intra shard tx that has an output to that same sender account. added integration test
…8-sc-processor-refund-gas
var agarioFile = "agarioV2.hex" | ||
var stepDelay = time.Second | ||
|
||
func TestShouldProcessBlocksWithScTxsJoinAndRewardTheOwner(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function too long
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reduced to 47 chars
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not the function name. but the number of the lines in the function
integrationTests/singleShard/block/executingMiniblocksSc_test.go
Outdated
Show resolved
Hide resolved
integrationTests/singleShard/block/executingMiniblocksSc_test.go
Outdated
Show resolved
Hide resolved
nodes []*integrationTests.TestProcessorNode, | ||
idxNode int, | ||
joinGameVal *big.Int, | ||
scAddress []byte) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add enter after []byte
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
idxNodeOwner int, | ||
idxNodeUser int, | ||
prize *big.Int, | ||
scAddress []byte) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add enter after []byte
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
syncBlock(t, nodes, idxProposer, round) | ||
round = incrementAndPrintRound(round) | ||
|
||
proposeBlock(nodes, idxProposer, round) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need to propose and sync again ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍, I was about to ask the same thing, maybe a comment would be needed here as an explanation
scAddress []byte) { | ||
|
||
fmt.Println("Calling SC.rewardAndSendToWallet...") | ||
txDeploy := createTxRewardAndSendToWallet(nodes[idxNodeOwner], nodes[idxNodeUser], prize, scAddress) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not a deploy tx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, fixed also multishard/block
scAddress []byte) { | ||
|
||
fmt.Println("Calling SC.joinGame...") | ||
txDeploy := createTxJoinGame(nodes[idxNode], joinGameVal, scAddress) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not a deploy tx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
…est initializer, small code reformatting, changed some variable names, removed one extra step (propose-sync) in singleshard/block executingMiniblocksSc
integrationTests/singleShard/block/executingMiniblocksSc_test.go
Outdated
Show resolved
Hide resolved
syncBlock(t, nodes, idxProposer, round) | ||
round = incrementAndPrintRound(round) | ||
|
||
proposeBlock(nodes, idxProposer, round) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍, I was about to ask the same thing, maybe a comment would be needed here as an explanation
…located in smartcontract/process in a function called reloadLocalSndAccount
….com/ElrondNetwork/elrond-go into bugs/EN-3228-sc-processor-refund-gas
Fixed bug when refunding gas to the tx sender when executing an intra-shard sc call tx and VM changed the balance of the sender
Added integration test