Post
Topic
Board Electrum
Re: How can I sign a transaction with a private key on electrum console
by
pooya87
on 20/03/2021, 04:37:44 UTC
There is something weird happening in the sign_transaction() code that seems to make it ignore the privkey Huh
It is not ignoring the private key, it doesn't know how to sign the transaction because the signature scripts are empty. It also uses the given private key if the command is called using the "privkey" parameter, otherwise it will call the wallet instance and asks if it can sign the given tx.
https://github.com/spesmilo/electrum/blob/64a931f21e6f6699f192158e54ff8f2883682604/electrum/commands.py#L397-L402