fix setting sd hash
This commit is contained in:
parent
4b3a6ab875
commit
b1720d1659
1 changed files with 2 additions and 3 deletions
|
@ -1923,15 +1923,14 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||||
)
|
)
|
||||||
|
|
||||||
claim = Claim()
|
claim = Claim()
|
||||||
claim.stream.update(file_path=file_path, hash='0'*96, **kwargs)
|
file_stream = await self.stream_manager.create_stream(file_path)
|
||||||
|
claim.stream.update(file_path=file_path, hash=file_stream.sd_hash, **kwargs)
|
||||||
tx = await Transaction.claim_create(
|
tx = await Transaction.claim_create(
|
||||||
name, claim, amount, claim_address, [account], account, channel
|
name, claim, amount, claim_address, [account], account, channel
|
||||||
)
|
)
|
||||||
new_txo = tx.outputs[0]
|
new_txo = tx.outputs[0]
|
||||||
|
|
||||||
if not preview:
|
if not preview:
|
||||||
file_stream = await self.stream_manager.create_stream(file_path)
|
|
||||||
claim.stream.hash = file_stream.sd_hash
|
|
||||||
if channel:
|
if channel:
|
||||||
new_txo.sign(channel)
|
new_txo.sign(channel)
|
||||||
await tx.sign([account])
|
await tx.sign([account])
|
||||||
|
|
Loading…
Add table
Reference in a new issue