Skip to content

Commit

Permalink
Merge pull request #647 from SmithSamuelM/misfit
Browse files Browse the repository at this point in the history
removed potentially buggy redundant inject of db.prefixes into Kever.…
  • Loading branch information
SmithSamuelM authored Dec 31, 2023
2 parents 7069064 + 3da23b8 commit 38c98ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
17 changes: 9 additions & 8 deletions src/keri/core/eventing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1623,7 +1623,7 @@ class Kever:

def __init__(self, *, state=None, serder=None, sigers=None, wigers=None,
db=None, estOnly=None, delseqner=None, delsaider=None, firner=None,
dater=None, cues=None, prefixes=None, local=True, check=False):
dater=None, cues=None, local=True, check=False):
"""
Create incepting kever and state from inception serder
Verify incepting serder against sigers raises ValidationError if not
Expand Down Expand Up @@ -1651,11 +1651,6 @@ def __init__(self, *, state=None, serder=None, sigers=None, wigers=None,
When dater provided then use dater for first seen datetime
cues (Deck | None): reference to Kevery.cues Deck when provided
i.e. notices of events or requests to respond to
prefixes (list | None): own prefixes for own local habitats.
May not include the prefix of this Kever's event when inception
has not yet been accepted into KEL
Some restrictions if present
If empty then effectively in promiscuous mode
local (bool): event source for validation logic
True means event source is local (protected).
False means event source is remote (unprotected).
Expand All @@ -1673,7 +1668,6 @@ def __init__(self, *, state=None, serder=None, sigers=None, wigers=None,
db = basing.Baser(reopen=True) # default name = "main"
self.db = db
self.cues = cues
self.prefixes = prefixes if prefixes is not None else db.prefixes
local = True if local else False

if state: # preload from state
Expand Down Expand Up @@ -1760,6 +1754,14 @@ def kevers(self):
return self.db.kevers


@property
def prefixes(self):
"""
Returns .db.prefixes
"""
return self.db.prefixes


@property
def transferable(self):
"""
Expand Down Expand Up @@ -3440,7 +3442,6 @@ def processEvent(self, serder, sigers, *, wigers=None,
firner=firner if self.cloned else None,
dater=dater if self.cloned else None,
cues=self.cues,
prefixes=self.prefixes,
local=local,
check=self.check)
self.kevers[pre] = kever # not exception so add to kevers
Expand Down
2 changes: 0 additions & 2 deletions src/keri/db/basing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,6 @@ def reload(self):
try:
kever = eventing.Kever(state=ksr,
db=self,
prefixes=self.prefixes,
local=True)
except kering.MissingEntryError as ex: # no kel event for keystate
removes.append(keys) # remove from .habs
Expand All @@ -1212,7 +1211,6 @@ def reload(self):
try:
kever = eventing.Kever(state=ksr,
db=self,
prefixes=self.prefixes,
local=True)
except kering.MissingEntryError as ex: # no kel event for keystate
removes.append(keys) # remove from .habs
Expand Down

0 comments on commit 38c98ba

Please sign in to comment.