mirror of https://github.com/waku-org/nwaku.git
chore(rln-relay): additional logging (#1243)
* chore(rln-relay): additional logging * fix: whitespace
This commit is contained in:
parent
3e1e7cc74f
commit
f8c4d9aebc
|
@ -929,9 +929,10 @@ proc subscribeToGroupEvents(ethClientUri: string, ethAccountAddress: Address, co
|
||||||
handler(pubkey, index)
|
handler(pubkey, index)
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
# chronos still raises exceptions which inherit directly from Exception
|
# chronos still raises exceptions which inherit directly from Exception
|
||||||
|
error "Error handling new member registration: ", err=err.msg
|
||||||
doAssert false, err.msg
|
doAssert false, err.msg
|
||||||
do (err: CatchableError):
|
do (err: CatchableError):
|
||||||
echo "Error from subscription: ", err.msg
|
error "Error from subscription: ", err=err.msg
|
||||||
|
|
||||||
proc handleGroupUpdates*(rlnPeer: WakuRLNRelay, handler: RegistrationEventHandler) {.async, gcsafe.} =
|
proc handleGroupUpdates*(rlnPeer: WakuRLNRelay, handler: RegistrationEventHandler) {.async, gcsafe.} =
|
||||||
# mounts the supplied handler for the registration events emitting from the membership contract
|
# mounts the supplied handler for the registration events emitting from the membership contract
|
||||||
|
@ -1109,6 +1110,7 @@ proc mountRlnRelayDynamic*(node: WakuNode,
|
||||||
let pk = pubkey.toIDCommitment()
|
let pk = pubkey.toIDCommitment()
|
||||||
let isSuccessful = rlnPeer.insertMember(pk)
|
let isSuccessful = rlnPeer.insertMember(pk)
|
||||||
debug "received pk", pk=pk.toHex, index =index
|
debug "received pk", pk=pk.toHex, index =index
|
||||||
|
debug "acceptable window", validRoots=rlnPeer.validMerkleRoots
|
||||||
doAssert(isSuccessful.isOk())
|
doAssert(isSuccessful.isOk())
|
||||||
|
|
||||||
asyncSpawn rlnPeer.handleGroupUpdates(handler)
|
asyncSpawn rlnPeer.handleGroupUpdates(handler)
|
||||||
|
@ -1174,6 +1176,7 @@ proc mount(node: WakuNode,
|
||||||
else: # mount the rln relay protocol in the on-chain/dynamic mode
|
else: # mount the rln relay protocol in the on-chain/dynamic mode
|
||||||
echo "setting up waku-rln-relay in on-chain mode... "
|
echo "setting up waku-rln-relay in on-chain mode... "
|
||||||
|
|
||||||
|
debug "on-chain parameters", contractAddress=conf.rlnRelayEthContractAddress
|
||||||
# read related inputs to run rln-relay in on-chain mode and do type conversion when needed
|
# read related inputs to run rln-relay in on-chain mode and do type conversion when needed
|
||||||
let
|
let
|
||||||
ethAccountAddr = web3.fromHex(web3.Address, conf.rlnRelayEthAccountAddress)
|
ethAccountAddr = web3.fromHex(web3.Address, conf.rlnRelayEthAccountAddress)
|
||||||
|
|
Loading…
Reference in New Issue