New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to sweep Bitcoin Core P2SH segwit private key: "No inputs found." #4406

Closed
rapodaca opened this Issue Jun 4, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@rapodaca
Copy link

rapodaca commented Jun 4, 2018

All on testnet:

On Bitcoin Core 0.16:

  • created a new default wallet
  • accepted payment from the Receive tab
  • obtained address by double-clicking (P2SH-segwit, starts with "2")
  • obtained private key from Console with dumpprivkey
  • block explorer shows address has funds

On Electrum 3.1.3:

  • created a new default wallet
  • Wallet>Private Keys>Sweep
  • pasted private key from Bitcoin Core
  • error: "No inputs found. (Note that inputs need to be confirmed)"

I was expecting Electrum to sweep. Instead, it gave an error.

Electrum wallet created with import defaults to P2PKH, giving wrong address.

My interpretation:

Bitcoin Core is creating segwit-P2SH addresses by default. However, Electrum doesn't know this and is attempting to scan for P2PKH based off of private key.

Electrum finds no P2PKH outputs matching private key, so reports an error.

Is it possible to import into Electrum a Bitcoin Core 0.16.0 default private key?

@SomberNight

This comment has been minimized.

Copy link
Member

SomberNight commented Jun 4, 2018

Prefix the WIF key with p2wpkh-p2sh:.

Related:
#3925

electrum/RELEASE-NOTES

Lines 88 to 91 in f0daf2d

* The Wallet Import Format (WIF) for private keys that was extended in 3.0
is changed. Keys in the previous format can be imported, compatibility
is maintained. Newly exported keys will be serialized as
"script_type:original_wif_format_key".

@rapodaca

This comment has been minimized.

Copy link

rapodaca commented Jun 4, 2018

Worked - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment