Include Byron witness once for each input path

pull/1153/head
gabrielkerekes 4 years ago committed by Pavol Rusnak
parent a729ef1c26
commit 1ed8b56b7c

@ -320,6 +320,7 @@ def _build_shelley_witnesses(
) -> List[Tuple[bytes, bytes]]:
shelley_witnesses = []
# include only one witness for each path
paths = set()
for input in inputs:
if not is_shelley_path(input.address_n):
@ -363,11 +364,16 @@ def _build_byron_witnesses(
protocol_magic: int,
) -> List[Tuple[bytes, bytes, bytes, bytes]]:
byron_witnesses = []
# include only one witness for each path
paths = set()
for input in inputs:
if not is_byron_path(input.address_n):
continue
paths.add(tuple(input.address_n))
node = keychain.derive(input.address_n)
for path in paths:
node = keychain.derive(list(input.address_n))
public_key = remove_ed25519_prefix(node.public_key())
signature = ed25519.sign_ext(

Loading…
Cancel
Save