Refactor snapshot

Better reuse snapshotting fucntions in the Bookie, and use it to support
doing Inker clone checks
This commit is contained in:
martinsumner 2016-10-31 17:26:28 +00:00
parent bd6c44e9b0
commit 7d3a04428b
3 changed files with 88 additions and 68 deletions

View file

@ -38,6 +38,7 @@
strip_to_seqonly/1,
strip_to_statusonly/1,
strip_to_keyseqstatusonly/1,
strip_to_keyseqonly/1,
striphead_to_details/1,
is_active/3,
endkey_passed/2,
@ -89,6 +90,8 @@ strip_to_statusonly({_, {_, St, _}}) -> St.
strip_to_seqonly({_, {SeqN, _, _}}) -> SeqN.
strip_to_keyseqonly({LK, {SeqN, _, _}}) -> {LK, SeqN}.
striphead_to_details({SeqN, St, MD}) -> {SeqN, St, MD}.
key_dominates(LeftKey, RightKey) ->