Skip to content

Commit 0cce053

Browse files
committed
fix the bug of JsonRpcCallAndEstimateGasTest
1 parent 584b53e commit 0cce053

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

framework/src/test/java/org/tron/core/jsonrpc/JsonRpcCallAndEstimateGasTest.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,9 @@ private static TronJsonRpcImpl newRpcWithMockedFailedCall(byte[] resData, Estima
211211
});
212212
}
213213

214-
return new TronJsonRpcImpl(mockNodeInfo, mockWallet, mockManager);
214+
TronJsonRpcImpl rpc = new TronJsonRpcImpl(mockNodeInfo, mockWallet);
215+
rpc.setManager(mockManager);
216+
return rpc;
215217
}
216218

217219
private static TronJsonRpcImpl newRpcWithMockedSuccessfulCall(byte[]... constantResults)
@@ -237,7 +239,9 @@ private static TronJsonRpcImpl newRpcWithMockedSuccessfulCall(byte[]... constant
237239
.build();
238240
});
239241

240-
return new TronJsonRpcImpl(mockNodeInfo, mockWallet, mockManager);
242+
TronJsonRpcImpl rpc = new TronJsonRpcImpl(mockNodeInfo, mockWallet);
243+
rpc.setManager(mockManager);
244+
return rpc;
241245
}
242246

243247
private static TronJsonRpcImpl newRpcWithMockedEstimateGasSuccessfulCall(long energyValue,
@@ -272,6 +276,8 @@ private static TronJsonRpcImpl newRpcWithMockedEstimateGasSuccessfulCall(long en
272276
});
273277
}
274278

275-
return new TronJsonRpcImpl(mockNodeInfo, mockWallet, mockManager);
279+
TronJsonRpcImpl rpc = new TronJsonRpcImpl(mockNodeInfo, mockWallet);
280+
rpc.setManager(mockManager);
281+
return rpc;
276282
}
277283
}

0 commit comments

Comments
 (0)