mirror of https://github.com/status-im/nim-eth.git
Add some simple accessors needed in NBC for the JSON-RPC service
This commit is contained in:
parent
ab6a087d4d
commit
b3b5854003
|
@ -1,7 +1,7 @@
|
|||
import
|
||||
chronos, chronicles
|
||||
|
||||
proc catchOrQuit(error: Exception) =
|
||||
proc catchOrQuit*(error: Exception) =
|
||||
if error of CatchableError:
|
||||
trace "Async operation ended with a recoverable error", err = error.msg
|
||||
else:
|
||||
|
|
|
@ -68,6 +68,9 @@ proc newProtocol*(privKey: PrivateKey, db: Database,
|
|||
|
||||
result.routingTable.init(node)
|
||||
|
||||
func privKey*(p: Protocol): lent PrivateKey =
|
||||
p.privateKey
|
||||
|
||||
proc send(d: Protocol, a: Address, data: seq[byte]) =
|
||||
# debug "Sending bytes", amount = data.len, to = a
|
||||
let ta = initTAddress(a.ip, a.udpPort)
|
||||
|
|
Loading…
Reference in New Issue