Add block "chains" (ex. parent->child mergable blocks)
This commit is contained in:
parent
8846dcc2c6
commit
cdb199e74d
4 changed files with 152 additions and 14 deletions
|
@ -655,7 +655,7 @@ class Core:
|
|||
conn.close()
|
||||
return True
|
||||
|
||||
def insertBlock(self, data, header='txt', sign=False):
|
||||
def insertBlock(self, data, header='txt', sign=False, metadata = {}):
|
||||
'''
|
||||
Inserts a block into the network
|
||||
'''
|
||||
|
@ -688,7 +688,11 @@ class Core:
|
|||
data = data.encode()
|
||||
|
||||
retData = ''
|
||||
metadata = {'type': header, 'powHash': powHash, 'powToken': powToken}
|
||||
|
||||
metadata['type'] = header
|
||||
metadata['powHash'] = powHash
|
||||
metadata['powToken'] = powToken
|
||||
|
||||
sig = {}
|
||||
|
||||
metadata = json.dumps(metadata)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue