mirror of
https://github.com/monero-project/research-lab.git
synced 2024-12-22 19:49:35 +00:00
udpate ffs
This commit is contained in:
parent
463d8f35e2
commit
cdaeb98d1d
1 changed files with 6 additions and 6 deletions
|
@ -7,14 +7,14 @@
|
||||||
between blocks.
|
between blocks.
|
||||||
|
|
||||||
Another handler will extract a coherent/robust list of non-conflict-
|
Another handler will extract a coherent/robust list of non-conflict-
|
||||||
ing transactions from a reduced/robust RoBlocks object.
|
ing transactions from a reduced/robust BlockHandler object.
|
||||||
'''
|
'''
|
||||||
from Block import *
|
from Block import *
|
||||||
|
|
||||||
class RoBlocks(object):
|
class BlockHandler(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
print("Initializing")
|
print("Initializing")
|
||||||
# Initialize a RoBlocks object.
|
# Initialize a BlockHandler object.
|
||||||
self.data = None
|
self.data = None
|
||||||
self.blocks = {} # Set of blocks (which track parents)
|
self.blocks = {} # Set of blocks (which track parents)
|
||||||
self.family = {} # Doubly linked list tracks parent-and-child links
|
self.family = {} # Doubly linked list tracks parent-and-child links
|
||||||
|
@ -214,7 +214,7 @@ class RoBlocks(object):
|
||||||
|
|
||||||
def pruneLeaves(self):
|
def pruneLeaves(self):
|
||||||
print("Pruning leaves")
|
print("Pruning leaves")
|
||||||
out = RoBlocks()
|
out = BlockHandler()
|
||||||
q = deque()
|
q = deque()
|
||||||
for rootIdent in self.roots:
|
for rootIdent in self.roots:
|
||||||
q.append(rootIdent)
|
q.append(rootIdent)
|
||||||
|
@ -227,8 +227,8 @@ class RoBlocks(object):
|
||||||
return out
|
return out
|
||||||
|
|
||||||
class Test_RoBlock(unittest.TestCase):
|
class Test_RoBlock(unittest.TestCase):
|
||||||
def test_RoBlocks(self):
|
def test_BlockHandler(self):
|
||||||
R = RoBlocks()
|
R = BlockHandler()
|
||||||
b = Block()
|
b = Block()
|
||||||
b.data = "zirconium encrusted tweezers"
|
b.data = "zirconium encrusted tweezers"
|
||||||
b._recomputeIdent()
|
b._recomputeIdent()
|
Loading…
Reference in a new issue