public static ContractsPoolItem FromACSItem(ACSItem acsItem) { return(new ContractsPoolItem() { Hash = acsItem.Hash, CostFn = acsItem.CostFn, KalapasPerBlock = acsItem.KalapasPerBlock, Refs = 0, Extracted = acsItem.Extracted, Serialized = acsItem.Serialized, }); }
public void AddRef(byte[] txHash, ACSItem acsItem) { BlockChainTrace.Information("contract ref added", acsItem.Hash); BlockChainTrace.Information(" by", txHash); if (!ContainsKey(acsItem.Hash)) { this[acsItem.Hash] = ContractsPoolItem.FromACSItem(acsItem); } var contractsPoolItem = this[acsItem.Hash]; contractsPoolItem.Refs++; _Txs[txHash] = acsItem.Hash; }