Ensure to return err for nil RPCCLient
This commit is contained in:
parent
efa10134e8
commit
8145412d1c
|
@ -231,6 +231,10 @@ func (m *StatusBackend) DiscardTransactions(ids []common.QueuedTxID) map[common.
|
||||||
// registerHandlers attaches Status callback handlers to running node
|
// registerHandlers attaches Status callback handlers to running node
|
||||||
func (m *StatusBackend) registerHandlers() error {
|
func (m *StatusBackend) registerHandlers() error {
|
||||||
rpcClient := m.NodeManager().RPCClient()
|
rpcClient := m.NodeManager().RPCClient()
|
||||||
|
if rpcClient == nil {
|
||||||
|
return node.ErrRPCClient
|
||||||
|
}
|
||||||
|
|
||||||
rpcClient.RegisterHandler("eth_accounts", m.accountManager.AccountsRPCHandler())
|
rpcClient.RegisterHandler("eth_accounts", m.accountManager.AccountsRPCHandler())
|
||||||
rpcClient.RegisterHandler("eth_sendTransaction", m.txQueueManager.SendTransactionRPCHandler)
|
rpcClient.RegisterHandler("eth_sendTransaction", m.txQueueManager.SendTransactionRPCHandler)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue