mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-07 00:13:06 +00:00
replace handlers.nim appendRLNProof with unsafe override for testing
This commit is contained in:
parent
65a571a78f
commit
0c7cdb7572
@ -21,7 +21,8 @@ import
|
||||
../serdes,
|
||||
../responses,
|
||||
../rest_serdes,
|
||||
./types
|
||||
./types,
|
||||
../../../../../tests/waku_rln_relay/rln/waku_rln_relay_utils
|
||||
|
||||
from std/times import getTime
|
||||
from std/times import toUnix
|
||||
@ -155,7 +156,7 @@ proc installRelayApiHandlers*(
|
||||
if not node.wakuRlnRelay.isNil():
|
||||
# append the proof to the message
|
||||
|
||||
node.wakuRlnRelay.appendRLNProof(message, float64(getTime().toUnix())).isOkOr:
|
||||
node.wakuRlnRelay.unsafeAppendRLNProof(message, float64(getTime().toUnix())).isOkOr:
|
||||
return RestApiResponse.internalServerError(
|
||||
"Failed to publish: error appending RLN proof to message: " & $error
|
||||
)
|
||||
@ -266,7 +267,7 @@ proc installRelayApiHandlers*(
|
||||
|
||||
# if RLN is mounted, append the proof to the message
|
||||
if not node.wakuRlnRelay.isNil():
|
||||
node.wakuRlnRelay.appendRLNProof(message, float64(getTime().toUnix())).isOkOr:
|
||||
node.wakuRlnRelay.unsafeAppendRLNProof(message, float64(getTime().toUnix())).isOkOr:
|
||||
return RestApiResponse.internalServerError(
|
||||
"Failed to publish: error appending RLN proof to message: " & $error
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user