Skip to content
Snippets Groups Projects
Commit 79efb251 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[fix] PeerDao (hash not always set)

parent 4f165dbf
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
curl -XPOST 'http://localhost:9200/gtest/movement/_search?pretty' -d '
{
"size": 1000,
"query": {
"bool": {
"filter": [
{"term": {"recipient" : "5ocqzyDMMWf1V8bsoNhWb1iNwax1e9M7VTUN6navs8of" }},
{"terms": {"code" : ["MEMBER_JOIN","MEMBER_ACTIVE","MEMBER_LEAVE","MEMBER_EXCLUDE","MEMBER_REVOKE"] }}
]
}
},
"aggs": {
"tx": {
"range": {
"field" : "medianTime",
"ranges" : [
{ "from" : 0, "to" : 1492041600 }
]
},
"aggs" : {
"received" : {
"filter": {"term": {"recipient": "5ocqzyDMMWf1V8bsoNhWb1iNwax1e9M7VTUN6navs8of"}},
"aggs": {
"received_stats": {
"stats": {
"field": "amount"
}
}
}
}
}
}
}
}'
#!/bin/sh
curl -XPOST 'http://gtest.data.duniter.fr:80/user/event/_search?pretty' -d '
{
"size": 1000,
"query": {
"bool": {
"filter": [
{"term": {"recipient" : "5ocqzyDMMWf1V8bsoNhWb1iNwax1e9M7VTUN6navs8of" }},
{"terms": {"code" : ["MEMBER_JOIN","MEMBER_ACTIVE","MEMBER_LEAVE","MEMBER_EXCLUDE","MEMBER_REVOKE"] }}
]
}
},
"sort" : [
{ "time" : {"order" : "desc"}}
],
_source: ["code", "time"]
}'
......@@ -57,7 +57,7 @@ public class PeerDaoImpl extends AbstractDao implements PeerDao {
Preconditions.checkNotNull(peer);
Preconditions.checkArgument(StringUtils.isNotBlank(peer.getId()));
Preconditions.checkArgument(StringUtils.isNotBlank(peer.getCurrency()));
Preconditions.checkNotNull(peer.getHash());
//Preconditions.checkNotNull(peer.getHash());
Preconditions.checkNotNull(peer.getHost());
Preconditions.checkNotNull(peer.getApi());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment