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, ""))
|
return b32_decode(string[1..].gsub(FOOTERS_REGEX, ""))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.blob_multihash?(unknown)
|
|
||||||
(unknown.is_a?(String) &&
|
|
||||||
unknown.length == 60 &&
|
|
||||||
(unknown[0] == BLOB_SIGIL))
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -29,9 +29,6 @@ module Pigeon
|
||||||
@depth = depth
|
@depth = depth
|
||||||
@kind = kind
|
@kind = kind
|
||||||
@prev = prev || Pigeon::NOTHING
|
@prev = prev || Pigeon::NOTHING
|
||||||
unless lipmaa.is_a?(String)
|
|
||||||
raise "Bad lipmaa value: #{lipmaa}"
|
|
||||||
end
|
|
||||||
@lipmaa = lipmaa
|
@lipmaa = lipmaa
|
||||||
@signature = signature
|
@signature = signature
|
||||||
end
|
end
|
||||||
|
|
|
@ -73,10 +73,6 @@ module Pigeon
|
||||||
|
|
||||||
# `nil` means "none"
|
# `nil` means "none"
|
||||||
def get_message_count_for(mhash)
|
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 }
|
read { store[COUNT_INDEX_NS][mhash] || 0 }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -97,10 +93,6 @@ module Pigeon
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_message_by_depth(multihash, depth)
|
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>
|
# Map<[multihash(str), depth(int)], Signature>
|
||||||
key = [multihash, depth].join(".")
|
key = [multihash, depth].join(".")
|
||||||
read { store[MESSAGE_BY_DEPTH_NS][key] }
|
read { store[MESSAGE_BY_DEPTH_NS][key] }
|
||||||
|
|
Loading…
Reference in New Issue