mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-04 08:16:19 +00:00
Add calls to get bloom filter and minimum PoW
This commit is contained in:
parent
89e67ca908
commit
fd71a13142
@ -93,6 +93,10 @@ int nimbus_unsubscribe_filter(const char* id);
|
||||
/* Post Whisper message */
|
||||
int nimbus_post(post_message* msg);
|
||||
|
||||
// TODO: why are these getters needed?
|
||||
double nimbus_get_min_pow();
|
||||
void nimbus_get_bloom_filter(uint8_t* bloomfilter);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -380,5 +380,11 @@ proc nimbus_subscribe_filter(options: ptr CFilterOptions,
|
||||
|
||||
result = node.subscribeFilter(filter, c_handler)
|
||||
|
||||
proc nimbus_unsubscribe_filter(id: cstring): bool {.exportc.} =
|
||||
proc nimbus_unsubscribe_filter(id: cstring): bool {.exportc, foreignThreadGc.} =
|
||||
result = node.unsubscribeFilter($id)
|
||||
|
||||
proc nimbus_get_min_pow(): float64 {.exportc, foreignThreadGc.} =
|
||||
result = node.protocolState(Whisper).config.powRequirement
|
||||
|
||||
proc nimbus_get_bloom_filter(bloom: ptr Bloom) {.exportc, foreignThreadGc.} =
|
||||
bloom[] = node.protocolState(Whisper).config.bloom
|
||||
|
Loading…
x
Reference in New Issue
Block a user