Commit 6f500681 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[enh] BMA Peer bean: add 'lastContact' and 'hash'

parent 38e59b91
Pipeline #9522 passed with stage
in 18 seconds
......@@ -43,6 +43,8 @@ public class NetworkPeers implements Serializable {
public static class Peer extends NetworkPeering implements Serializable {
public Long firstDown;
public Long lastTry;
public Long lastContact;
public String hash;
@JsonGetter("first_down")
public Long getFirstDown() {
......@@ -64,6 +66,26 @@ public class NetworkPeers implements Serializable {
this.lastTry = lastTry;
}
@JsonGetter("lastContact")
public Long getLastContact() {
return lastContact;
}
@JsonSetter("lastContact")
public void setLastContact(Long lastContact) {
this.lastContact = lastContact;
}
@JsonIgnore
public String getHash() {
return hash;
}
@JsonIgnore
public void setHash(String hash {
this.hash = hash;
}
@Override
@JsonIgnore
public String getRaw() {
......
......@@ -84,6 +84,7 @@ public class MerkleTree {
}
private void feed(String str) {
if(StringUtils.isNotBlank(str) && regexp.test(str)){
// Push leaf without hashing it since it is already a hash
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment