def save_multi_sig(request_handler): multi_sig_value = MultiSignatureValue(ledger_id=DOMAIN_LEDGER_ID, state_root_hash=state_roots_serializer.serialize( bytes(request_handler.state.committedHeadHash)), txn_root_hash='2' * 32, pool_state_root_hash='1' * 32, timestamp=get_utc_epoch()) multi_sig = MultiSignature('0' * 32, ['Alpha', 'Beta', 'Gamma'], multi_sig_value) request_handler.bls_store.put(multi_sig) return multi_sig.as_dict()
def put(self, multi_sig: MultiSignature): assert multi_sig is not None state_root_hash = multi_sig.value.state_root_hash serialized_multi_sign = self._serializer.serialize(multi_sig.as_dict()) self._kvs.put(state_root_hash, serialized_multi_sign)
def put(self, root_hash: str, sign: MultiSignature): assert root_hash is not None assert sign is not None serialized_multi_sign = self._serializer.serialize(sign.as_dict()) self._kvs.put(root_hash, serialized_multi_sign)
def put(self, multi_sig: MultiSignature): if multi_sig is None: raise ValueUndefinedError('multi_sig') state_root_hash = multi_sig.value.state_root_hash serialized_multi_sign = self._serializer.serialize(multi_sig.as_dict()) self._kvs.put(state_root_hash, serialized_multi_sign)
def put(self, multi_sig: MultiSignature): if multi_sig is None: raise ValueUndefinedError('multi_sig') state_root_hash = multi_sig.value.state_root_hash serialized_multi_sign = self._serializer.serialize(multi_sig.as_dict()) self._kvs.put(state_root_hash, serialized_multi_sign)