Dead code removal and other cleanups
This commit is contained in:
parent
e1c33f2441
commit
5d04457ddb
|
@ -266,12 +266,6 @@ module Pigeon
|
|||
return b32_decode(string[1..].gsub(FOOTERS_REGEX, ""))
|
||||
end
|
||||
end
|
||||
|
||||
def self.blob_multihash?(unknown)
|
||||
(unknown.is_a?(String) &&
|
||||
unknown.length == 60 &&
|
||||
(unknown[0] == BLOB_SIGIL))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -29,9 +29,6 @@ module Pigeon
|
|||
@depth = depth
|
||||
@kind = kind
|
||||
@prev = prev || Pigeon::NOTHING
|
||||
unless lipmaa.is_a?(String)
|
||||
raise "Bad lipmaa value: #{lipmaa}"
|
||||
end
|
||||
@lipmaa = lipmaa
|
||||
@signature = signature
|
||||
end
|
||||
|
|
|
@ -73,10 +73,6 @@ module Pigeon
|
|||
|
||||
# `nil` means "none"
|
||||
def get_message_count_for(mhash)
|
||||
unless mhash.is_a?(String)
|
||||
raise "Expected string, got #{mhash.class}"
|
||||
end # Delete later
|
||||
|
||||
read { store[COUNT_INDEX_NS][mhash] || 0 }
|
||||
end
|
||||
|
||||
|
@ -97,10 +93,6 @@ module Pigeon
|
|||
end
|
||||
|
||||
def get_message_by_depth(multihash, depth)
|
||||
unless multihash.is_a?(String)
|
||||
raise "Expected string, got #{multihash.class}"
|
||||
end # Delete later
|
||||
|
||||
# Map<[multihash(str), depth(int)], Signature>
|
||||
key = [multihash, depth].join(".")
|
||||
read { store[MESSAGE_BY_DEPTH_NS][key] }
|
||||
|
|
Loading…
Reference in New Issue