Compare commits
2 Commits
8527901e6c
...
8df2a03d5a
Author | SHA1 | Date | |
---|---|---|---|
|
8df2a03d5a | ||
|
af6eedf87e |
@ -1,12 +1,20 @@
|
|||||||
|
# standard imports
|
||||||
|
import hashlib
|
||||||
|
|
||||||
|
|
||||||
class SyncFilter:
|
class SyncFilter:
|
||||||
|
|
||||||
def common_name(self):
|
|
||||||
raise NotImplementedError()
|
|
||||||
|
|
||||||
|
|
||||||
def sum(self):
|
def sum(self):
|
||||||
raise NotImplementedError()
|
s = self.common_name()
|
||||||
|
h = hashlib.sha256()
|
||||||
|
h.update(s.encode('utf-8'))
|
||||||
|
return h.digest()
|
||||||
|
|
||||||
|
|
||||||
def filter(self, conn, block, tx):
|
def filter(self, conn, block, tx):
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
|
|
||||||
|
def common_name(self):
|
||||||
|
s = self.__module__ + '.' + self.__class__.__name__
|
||||||
|
return s.replace('.', '_')
|
||||||
|
Loading…
Reference in New Issue
Block a user