Accounting: Move flag to config and add basic test for accounting state (#284)

* Accounting: Add config flag (default to false)

Also fix bug where query function is called twice when flag is set.

* Accounting: test state update after store req
This commit is contained in:
Oskar Thorén
2020-11-21 13:31:48 +08:00
committed by GitHub
parent 1193b69d6c
commit f8aff5756c
4 changed files with 73 additions and 16 deletions
+1 -3
View File
@@ -213,9 +213,7 @@ proc processInput(rfd: AsyncFD, rng: ref BrHmacDrbgContext) {.async.} =
echo &"{payload}"
info "Hit store handler"
# TODO Use same flag as wakunode
# To be fixed here: https://github.com/status-im/nim-waku/issues/271
if false:
if conf.swap:
node.mountSwap()
await node.query(HistoryQuery(topics: @[DefaultContentTopic]), storeHandler)