From 71af0f2f9578354ec7b99b7488282a62158f358e Mon Sep 17 00:00:00 2001 From: jianguo Date: Thu, 9 Nov 2023 18:08:31 +0800 Subject: [PATCH 1/3] update --- test/scripts/deploy_sc/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/scripts/deploy_sc/main.go b/test/scripts/deploy_sc/main.go index 7cf5c404a9..2aca95e9cb 100644 --- a/test/scripts/deploy_sc/main.go +++ b/test/scripts/deploy_sc/main.go @@ -167,7 +167,7 @@ func ethTransfer(ctx context.Context, client *ethclient.Client, auth *bind.Trans log.Infof("sending transfer tx") err = client.SendTransaction(ctx, signedTx) - chkErr(err) + //chkErr(err) the new lasted return error is: "transaction would cause overdraft",ignore it log.Infof("tx sent: %v", signedTx.Hash().Hex()) rlp, err := signedTx.MarshalBinary() From 3e0be81cab5b9f2882e7df5872eddfb233198b19 Mon Sep 17 00:00:00 2001 From: jianguo Date: Thu, 9 Nov 2023 18:31:41 +0800 Subject: [PATCH 2/3] update --- test/scripts/deploy_sc/main.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/scripts/deploy_sc/main.go b/test/scripts/deploy_sc/main.go index 2aca95e9cb..48a437f537 100644 --- a/test/scripts/deploy_sc/main.go +++ b/test/scripts/deploy_sc/main.go @@ -132,14 +132,12 @@ func main() { log.Debugf("Sending TX to transfer ETH") to := common.HexToAddress(receiverAddr) tx = ethTransfer(ctx, client, auth, to, transferAmount, nil) - fmt.Println() - + err = operations.WaitTxToBeMined(ctx, client, tx, txTimeout) + chkErr(err) // Invalid ETH Transfer log.Debugf("Sending Invalid TX to transfer ETH") nonce := tx.Nonce() + 1 ethTransfer(ctx, client, auth, to, transferAmount, &nonce) - err = operations.WaitTxToBeMined(ctx, client, tx, txTimeout) - chkErr(err) fmt.Println() } } From e7e3b17e75d6df17ed189849cf9786e768ad7af8 Mon Sep 17 00:00:00 2001 From: jianguo Date: Thu, 9 Nov 2023 18:38:48 +0800 Subject: [PATCH 3/3] update --- test/scripts/deploy_sc/main.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/scripts/deploy_sc/main.go b/test/scripts/deploy_sc/main.go index 48a437f537..9c2ddc9df5 100644 --- a/test/scripts/deploy_sc/main.go +++ b/test/scripts/deploy_sc/main.go @@ -132,12 +132,14 @@ func main() { log.Debugf("Sending TX to transfer ETH") to := common.HexToAddress(receiverAddr) tx = ethTransfer(ctx, client, auth, to, transferAmount, nil) - err = operations.WaitTxToBeMined(ctx, client, tx, txTimeout) - chkErr(err) + fmt.Println() + // Invalid ETH Transfer log.Debugf("Sending Invalid TX to transfer ETH") nonce := tx.Nonce() + 1 ethTransfer(ctx, client, auth, to, transferAmount, &nonce) + err = operations.WaitTxToBeMined(ctx, client, tx, txTimeout) + chkErr(err) fmt.Println() } } @@ -165,7 +167,8 @@ func ethTransfer(ctx context.Context, client *ethclient.Client, auth *bind.Trans log.Infof("sending transfer tx") err = client.SendTransaction(ctx, signedTx) - //chkErr(err) the new lasted return error is: "transaction would cause overdraft",ignore it + // The latest geth client return error is: "transaction would cause overdraft",ignore it + // chkErr(err) log.Infof("tx sent: %v", signedTx.Hash().Hex()) rlp, err := signedTx.MarshalBinary()