def newNode(self, nodeName: str): config = getConfig() createGenesisTxnFile(self.genesisTransactions, self.basedirpath, config.domainTransactionsFile, getTxnOrderedFields(), reset=False) nodesAdded = super().newNode(nodeName) return nodesAdded
def getPrimaryStorage(self): """ This is usually an implementation of Ledger """ if self.config.primaryStorage is None: fields = getTxnOrderedFields() return Ledger(CompactMerkleTree(hashStore=self.hashStore), dataDir=self.dataLocation, serializer=CompactSerializer(fields=fields), fileName=self.config.domainTransactionsFile) else: return initStorage(self.config.primaryStorage, name=self.name + NODE_PRIMARY_STORAGE_SUFFIX, dataDir=self.dataLocation, config=self.config)
def domainTxnOrderedFields(): return getTxnOrderedFields()
def txnFieldOrdering(self): fields = getTxnOrderedFields() return updateFieldsWithSeqNo(fields)
attrDefs = IssuerModule.AttribDef('BYU', attrTypes) attributes = attrDefs.attribs(**rawAttributes) dataDir = '/tmp/data' if os.path.exists(dataDir): shutil.rmtree(dataDir) tdir = tempfile.TemporaryDirectory().name stewardWallet = _newWallet() sponsorWallet = _newWallet() issuerWallet = _newWallet() proverWallet = _newWallet() verifierWallet = _newWallet() createGenesisTxnFile(genesisTxns(stewardWallet), tdir, config.domainTransactionsFile, getTxnOrderedFields()) nodes = TestNodeSet(nodeReg=genNodeReg(count=4), tmpdir=tdir, primaryDecider=None) def whitelistClient(nodes, *clientNames): for node in nodes: for nm in clientNames: node.whitelistClient(nm) looper = Looper(nodes, autoStart=True) for node in nodes: node.startKeySharing()