Compare commits

..

2 Commits

Author SHA1 Message Date
lash
8df2a03d5a
Add belated changelog 2022-03-30 08:14:42 +00:00
lash
af6eedf87e
Set defaults for common name and sum in filter 2022-03-30 08:13:34 +00:00
2 changed files with 16 additions and 6 deletions

2
CHANGELOG Normal file
View File

@ -0,0 +1,2 @@
* 0.3.0
- Re-implement chainsyncer on shep

View File

@ -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('.', '_')