MCPcopy Create free account
hub / github.com/ElementsProject/elements / remove

Method remove

test/functional/test_framework/muhash.py:84–87  ·  view source on GitHub ↗

Remove a byte array from the set.

(self, data)

Source from the content-addressed store, hash-verified

82 self.numerator = (self.numerator * data_to_num3072(data_hash)) % self.MODULUS
83
84 def remove(self, data):
85 """Remove a byte array from the set."""
86 data_hash = hashlib.sha256(data).digest()
87 self.denominator = (self.denominator * data_to_num3072(data_hash)) % self.MODULUS
88
89 def digest(self):
90 """Extract the final hash. Does not modify this object."""

Callers 15

test_muhashMethod · 0.95
run_testMethod · 0.45
run_testMethod · 0.45
run_testMethod · 0.45
change_labelFunction · 0.45
run_testMethod · 0.45
erase_threeMethod · 0.45
mainFunction · 0.45
get_nextMethod · 0.45
_initialize_chainMethod · 0.45
delete_cookie_fileFunction · 0.45
mainFunction · 0.45

Calls 2

data_to_num3072Function · 0.85
digestMethod · 0.80

Tested by 15

test_muhashMethod · 0.76
mainFunction · 0.36
get_nextMethod · 0.36
_initialize_chainMethod · 0.36
mainFunction · 0.36
test_default_asmapMethod · 0.36
test_empty_asmapMethod · 0.36
test_wallet_recoveryMethod · 0.36
test_tx_requestsMethod · 0.36