Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions chain33.fork.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ ForkEVMFixOverflow=0
ForkEVMSuicidePayer=0
# Revertible value transfers; -1 keeps the fix off (resolved to MaxHeight)
ForkEVMTransferRevert=-1
# Internal CREATE/CREATE2 follow Ethereum address derivation; -1 keeps it off
ForkEVMContractCreateV2=-1


[fork.sub.evmxgo]
Expand Down
2 changes: 2 additions & 0 deletions chain33.para.toml
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,8 @@ ForkEVMFixOverflow=0
ForkEVMSuicidePayer=0
# Revertible value transfers; -1 keeps the fix off (resolved to MaxHeight)
ForkEVMTransferRevert=-1
# Internal CREATE/CREATE2 follow Ethereum address derivation; -1 keeps it off
ForkEVMContractCreateV2=-1

[fork.sub.blackwhite]
Enable=0
Expand Down
2 changes: 2 additions & 0 deletions plugin/dapp/evm/cmd/ci2/chain33.proxyminer.toml
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,8 @@ ForkEVMFixOverflow=0
ForkEVMSuicidePayer=0
# Revertible value transfers; -1 keeps the fix off (resolved to MaxHeight)
ForkEVMTransferRevert=-1
# Internal CREATE/CREATE2 follow Ethereum address derivation; -1 keeps it off
ForkEVMContractCreateV2=-1

[fork.sub.evmxgo]
Enable=0
Expand Down
21 changes: 13 additions & 8 deletions plugin/dapp/evm/cmd/ci2/docker-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,10 @@ function withdrawTicketBalance(){
local balance=$(echo "${result}" | jq -r ".balance")
tbalance=$(printf "%.0f\n" $balance)
echo "ticket balance:${tbalance},addr:${m4normalAddr},timestamp:$(date +"%s")"
# The ticket balance also grows with mining rewards, so it cannot be used as
# the expected coin balance after the withdraw. Compare the coins delta.
local coinsBefore=$(${CLI} account balance -a "${m4normalAddr}" -e coins | jq -er ".balance")
echo "coins balance before withdraw:${coinsBefore}"

local withdrawTx=$( ${CLI} coins withdraw -e ticket -a 100000 -n "take test money")
echo "withdraw rawTx:${withdrawTx}"
Expand All @@ -409,14 +413,15 @@ function withdrawTicketBalance(){
fi
echo "withdraw hash:${hash}"
chain33_QueryTx ${hash} ${MCli}
#check coins balance
local result=$(${CLI} account balance -a "${m4normalAddr}" -e coins)
local balance=$(echo "${result}" | jq -r ".balance")
echo "coldminer addr coins balance:${balance}"
local checkBalance=$(printf "%.0f\n" $balance)
echo "checkBalance: $(("${checkBalance}")) "
if [ $((checkBalance)) -lt $((tbalance)) ]; then
exit 1
#check coins balance: the withdraw moves 100000 into the coins account minus the
#transaction fee (~0.1), so require a lower bound with margin instead of an exact
#value: the boundary is sensitive to floating-point rounding of the balances.
local coinsAfter=$(${CLI} account balance -a "${m4normalAddr}" -e coins | jq -er ".balance")
echo "coldminer addr coins balance after withdraw:${coinsAfter}"
if ! awk -v before="${coinsBefore}" -v after="${coinsAfter}" \
'BEGIN { exit !((after - before) >= 99999) }'; then
echo "withdraw balance check failed: before=${coinsBefore} after=${coinsAfter}"
exit 1
fi

}
Expand Down
Loading
Loading