misc cleanup

This commit is contained in:
2022-05-13 18:51:55 +08:00
parent 3f77c8886a
commit 075978b906
2 changed files with 2 additions and 13 deletions
+1 -12
View File
@@ -301,17 +301,6 @@ func deployTestContract(t *testing.T) (hexutil.Bytes, map[string]interface{}) {
return hash, receipt
}
func getTransactionReceipt(t *testing.T, hash hexutil.Bytes) map[string]interface{} {
param := []string{hash.String()}
rpcRes := call(t, "eth_getTransactionReceipt", param)
receipt := make(map[string]interface{})
err := json.Unmarshal(rpcRes.Result, &receipt)
require.NoError(t, err)
return receipt
}
func waitForReceipt(t *testing.T, hash hexutil.Bytes) map[string]interface{} {
timeout := time.After(12 * time.Second)
ticker := time.Tick(500 * time.Millisecond)
@@ -321,7 +310,7 @@ func waitForReceipt(t *testing.T, hash hexutil.Bytes) map[string]interface{} {
case <-timeout:
return nil
case <-ticker:
receipt := getTransactionReceipt(t, hash)
receipt := GetTransactionReceipt(t, hash)
if receipt != nil {
return receipt
}