feat: deliver emergent Jajce commitments
This commit is contained in:
@@ -317,6 +317,23 @@ static func is_knowable_event(event: EconomicEventRecord) -> bool:
|
||||
return false
|
||||
var event_type := StringName(event.data["event_type"])
|
||||
var item_id := StringName(event.data["item_id"])
|
||||
if (
|
||||
event_type
|
||||
in [
|
||||
SimulationIds.EVENT_COMMITMENT_ACCEPTED,
|
||||
SimulationIds.EVENT_COMMITMENT_FULFILLED,
|
||||
SimulationIds.EVENT_COMMITMENT_BROKEN,
|
||||
SimulationIds.EVENT_COMMITMENT_RELEASED,
|
||||
SimulationIds.EVENT_COMMITMENT_SUPERSEDED,
|
||||
]
|
||||
):
|
||||
return (
|
||||
KnownEventStateRecord.is_valid_actor_id(int(event.data["actor_id"]))
|
||||
and int(event.data.get("commitment_id", -1)) >= 0
|
||||
and event.data.get("debtor") is Dictionary
|
||||
and event.data.get("creditor") is Dictionary
|
||||
and event.data.get("terms") is Dictionary
|
||||
)
|
||||
if event_type == SimulationIds.EVENT_TASK_BLOCKED:
|
||||
return (
|
||||
int(event.data["actor_id"]) >= 0
|
||||
|
||||
Reference in New Issue
Block a user