mirror of https://github.com/waku-org/nwaku.git
3e65cc18f6
A node that handles REST-Store requests normally acts as a Store-client and therefore it retrieved the messages from another Store-node. With these changes, we allow a node with Store mounted, to retrieve its messages. In other words, the node can act as a Store-server of its messages. * test_rest_store.nim: add a new test to validate that the self-node can retrieve its messages to the REST client. * rest/store/client.nim: add new proc to allow making a GET store request without peerAddr. * rest/store/handle.nim: add logic to handle requests that don't provide peerAddr but the self/local node has Store mounted. In this case, the self/local node will retrieve its locally stored messages. * waku_store/self_req_handler.nim: logic to handle "store" requests allowing the REST-store node to act as a Store-server node. The 'self_req_handler.nim' helps to bypass the store protocol and directly retrieve the messages from the local/self node. I added this logic in a separate file from 'protocol.nim' because it doesn't participate in any libp2p communication. * waku_store/protocol.nim: make 'queryHandler' attribute public so that it can be used from the 'self_req_handler.nim' module. |
||
---|---|---|
.. | ||
common | ||
node | ||
resources | ||
testlib | ||
waku_archive | ||
waku_core | ||
waku_filter_v2 | ||
waku_relay | ||
waku_rln_relay | ||
waku_store | ||
wakunode2 | ||
wakunode_jsonrpc | ||
wakunode_rest | ||
all_tests_common.nim | ||
all_tests_waku.nim | ||
all_tests_wakunode2.nim | ||
nim.cfg | ||
postgres-docker-compose.yml | ||
test_all.nim | ||
test_helpers.nim | ||
test_message_cache.nim | ||
test_peer_exchange.nim | ||
test_peer_manager.nim | ||
test_peer_storage.nim | ||
test_peer_store_extended.nim | ||
test_utils_compat.nim | ||
test_waku_discv5.nim | ||
test_waku_dnsdisc.nim | ||
test_waku_enr.nim | ||
test_waku_filter_legacy.nim | ||
test_waku_keepalive.nim | ||
test_waku_keystore.nim | ||
test_waku_keystore_keyfile.nim | ||
test_waku_lightpush.nim | ||
test_waku_metadata.nim | ||
test_waku_netconfig.nim | ||
test_waku_noise.nim | ||
test_waku_noise_sessions.nim | ||
test_waku_peer_exchange.nim | ||
test_waku_protobufs.nim | ||
test_waku_rendezvous.nim | ||
test_waku_switch.nim | ||
test_wakunode.nim | ||
test_wakunode_filter_legacy.nim | ||
test_wakunode_lightpush.nim |