I tweek the code transation.py https://github.com/simplecrypto/cryptokit/blob/master/cryptokit/transaction.py#L150 add:

    if (self.default_witness_commitment is not None):
        data += b'\x00'
        data += b'\x01'

https://github.com/simplecrypto/cryptokit/blob/master/cryptokit/transaction.py#L173 add:

    if (self.default_witness_commitment is not None):
        combs = self.default_witness_commitment.decode("hex")
        data += b'\x6a'
        data += self.varlen_encode(len(combs)+4)
        data += b'\xaa\x21\xa9\xed'    
        data += combs

to match the BIP141 :https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#specification

However when I run it . I always getting CoinRPCException: Block decode failed

Any expert could help on this problem?

Reference: base on the proposal: https://litecoincore.org/ltc-segwit-pool.pdf and some reference :https://github.com/thrasher­/eloipool/commit/d488480c263c57a1e5151a6db3090d1413d3a054 https://github.com/zone117x/node­stratum­pool/pull/115 https://github.com/UNOMP/node­merged­pool/pull/4


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.