Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.
Sign up to join this communityAnybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top
I'm trying to convert a script that is build on btcutil and wire with Witness (Segwit) to without Witness. Mine blockchain doesn't support Segwit. Now the most part is already done just stuck in the last part.
Can someone help me out to get this convert without witness
switch class { case txscript.WitnessV0PubKeyHashTy: tx.TxIn[i].Witness = wire.TxWitness{fullsig, pkData} default: return nil, wrapErr( ErrUnsupportedScriptType, fmt.Errorf("unupported script type: %s", class), ) }
Now i made this to
switch class { case txscript.WitnessV0PubKeyHashTy: tx.TxIn[i].Witness = wire.TxWitness{fullsig, pkData} case txscript.PubKeyHashTy: tx.TxIn[i].Witness = wire.TxWitness{fullsig, pkData} default: return nil, wrapErr( ErrUnsupportedScriptType, fmt.Errorf("unupported script type: %s", class), ) }
I can't find a way to get this line to convert:
tx.TxIn[i].Witness = wire.TxWitness{fullsig, pkData}
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments