Documentation
¶
Overview ¶
* Test helpers.
* Dummy RPC backend. Implements Ethereum JSON-RPC calls that the tests need.
Index ¶
- Variables
- func MockTxApiHandler(w http.ResponseWriter, req *http.Request)
- func MockTxApiReset()
- func RpcBackendHandler(w http.ResponseWriter, req *http.Request)
- func SendRpcAndParseResponse(req *types.JsonRpcRequest) (*types.JsonRpcResponse, error)
- func SendRpcAndParseResponseOrFailNow(t *testing.T, req *types.JsonRpcRequest) *types.JsonRpcResponse
- func SendRpcAndParseResponseOrFailNowAllowRpcError(t *testing.T, req *types.JsonRpcRequest) *types.JsonRpcResponse
- func SendRpcAndParseResponseOrFailNowString(t *testing.T, req *types.JsonRpcRequest) string
Constants ¶
This section is empty.
Variables ¶
View Source
var MockBackendLastJsonRpcRequest *types.JsonRpcRequest
View Source
var MockBackendLastJsonRpcRequestTimestamp time.Time
View Source
var MockBackendLastRawRequest *http.Request
View Source
var MockTxApiStatusForHash map[string]types.PrivateTxStatus = make(map[string]types.PrivateTxStatus)
View Source
var RpcEndpointUrl string // set by test init()
View Source
var TestTx_BundleFailedTooManyTimes_From = "0xc84edF69E78C0E9dE5ccFE4fB9017F6F7566787f"
View Source
var TestTx_BundleFailedTooManyTimes_Hash = "0xfb34b88cd77215867aa8e8ff0abc7060178b8fed6519a85d0b22853dfd5e9fec"
View Source
var TestTx_BundleFailedTooManyTimes_RawTx = "" /* 836-byte string literal not displayed */
Test tx for bundle-failed-too-many-times MM1 fix
View Source
var TestTx_MM2_From = "0x7AaBc7915DF92a85E199DbB4B1D21E637e1a90A2"
View Source
var TestTx_MM2_Hash = "0xc543e2ad05cffdee95b984df20edd2e38e124c54461faa1276adc36e826588c9"
View Source
var TestTx_MM2_RawTx = "" /* 216-byte string literal not displayed */
Test tx for MM2 fix
Functions ¶
func MockTxApiHandler ¶
func MockTxApiHandler(w http.ResponseWriter, req *http.Request)
func MockTxApiReset ¶
func MockTxApiReset()
func RpcBackendHandler ¶
func RpcBackendHandler(w http.ResponseWriter, req *http.Request)
func SendRpcAndParseResponse ¶
func SendRpcAndParseResponse(req *types.JsonRpcRequest) (*types.JsonRpcResponse, error)
func SendRpcAndParseResponseOrFailNow ¶
func SendRpcAndParseResponseOrFailNow(t *testing.T, req *types.JsonRpcRequest) *types.JsonRpcResponse
func SendRpcAndParseResponseOrFailNowAllowRpcError ¶
func SendRpcAndParseResponseOrFailNowAllowRpcError(t *testing.T, req *types.JsonRpcRequest) *types.JsonRpcResponse
func SendRpcAndParseResponseOrFailNowString ¶
func SendRpcAndParseResponseOrFailNowString(t *testing.T, req *types.JsonRpcRequest) string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.