Skip to content

Commit

Permalink
Coded getMutableItem
Browse files Browse the repository at this point in the history
  • Loading branch information
aldenml committed Feb 19, 2016
1 parent 9e62d61 commit af3b0d0
Showing 1 changed file with 12 additions and 1 deletion.
Expand Up @@ -187,7 +187,18 @@ public long getMutableItemSeq(Sha1Hash target) {

@Override
public boolean getMutableItem(Sha1Hash target, long seq, boolean forceFill, entry item) {
return false;
DhtMutableItem f = mutables.get(target);
if (f == null) {
return false;
}

item.set("seq", f.seq);
if (forceFill || (0 <= seq && seq < f.seq)) {
item.set("v", entry.bdecode(Vectors.bytes2byte_vector(f.value)));
item.set("sig", Vectors.bytes2byte_vector(f.sig));
item.set("k", Vectors.bytes2byte_vector(f.key));
}
return true;
}

@Override
Expand Down

0 comments on commit af3b0d0

Please sign in to comment.