1. 22 Dec, 2018 4 commits
  2. 13 Dec, 2018 5 commits
  3. 06 Dec, 2018 7 commits
  4. 05 Dec, 2018 3 commits
  5. 03 Dec, 2018 9 commits
    • Pieter Wuille's avatar
      Add test for conversion from non-witness to witness UTXO · 7bee4145
      Pieter Wuille authored
      Github-Pull: #14197
      Rebased-From: 862d159d
      7bee4145
    • Glenn Willen's avatar
      Add regression test for PSBT signing bug #14473 · ff56bb9b
      Glenn Willen authored
      Github-Pull: #14588
      Rebased-From: e13fea97
      ff56bb9b
    • Glenn Willen's avatar
      Refactor PSBTInput signing to enforce invariant · db445d4e
      Glenn Willen authored
      Refactor the process of PSBTInput signing to enforce the invariant that
      a PSBTInput always has _either_ a witness_utxo or a non_witness_utxo,
      never both.
      
      This simplifies the logic of SignPSBTInput slightly, since it no longer
      has to deal with the "both" case. When calling it, we now give it, in
      order of preference: (1) whichever of the utxo fields was already
      present in the PSBT we received, or (2) if neither, the
      non_witness_utxo field, which is just a copy of the input transaction,
      which we get from the wallet.
      
      SignPSBTInput no longer has to remove one of the two fields; instead, it
      will check if we have a witness signature, and if so, it will replace
      the non_witness_utxo with the witness_utxo (which is smaller, as it is
      just a copy of the output being spent.)
      
      Add PSBTInput::IsSane checks in two more places, which checks for
      both utxo fields being present; we will now give an RPC error early on
      if we are supplied such a malformed PSBT to fill in.
      
      Also add a check to FillPSBT, to avoid touching any input that is
      already signed. (This is now redundant, since we should no longer
      potentially harm an already-signed input, but it's harmless.)
      
      fixes #14473
      
      Github-Pull: #14588
      db445d4e
    • Glenn Willen's avatar
      Simplify arguments to SignPSBTInput · ad94165d
      Glenn Willen authored
      Remove redundant arguments to SignPSBTInput -- since it needs several
      bits of the PartiallySignedTransaction, pass in a reference instead of
      doing it piecemeal. This saves us having to pass in both a PSBTInput and
      its index, as well as having to pass in the CTransaction. Also avoid
      redundantly passing the sighash_type, which is contained in the
      PSBTInput already.
      
      Github-Pull: #14588
      Rebased-From: 0f5bda2b
      ad94165d
    • Glenn Willen's avatar
      Add bool PSBTInputSigned · 39ece4fc
      Glenn Willen authored
      Refactor out a "PSBTInputSigned" function to check if a PSBT is signed,
      for use in subsequent commits.
      
      Also improve a related comment.
      
      GitHub-Pull: #14588
      Rebased-From: 53e6fffb
      39ece4fc
    • Glenn Willen's avatar
      New PartiallySignedTransaction constructor from CTransction · 70ee1f87
      Glenn Willen authored
      New constructor that creates a PartiallySignedTransaction from a
      CTransaction, automatically sizing the inputs and outputs vectors for
      convenience.
      
      Github-Pull: #14588
      Rebased-From: 65166d4c
      70ee1f87
    • Glenn Willen's avatar
      Remove redundant txConst parameter to FillPSBT · a9eab081
      Glenn Willen authored
      Github-Pull: #14588
      Rebased-From: 4f3f5cb4
      a9eab081
    • Glenn Willen's avatar
      More concise conversion of CDataStream to string · cfdd6b2f
      Glenn Willen authored
      Use .str() instead of .data() and .size() when converting CDataStream to
      a string. Uses std::string, avoiding conversion to a C string.
      
      Github-Pull: #14588
      Rebased-From: fe5d22bc
      cfdd6b2f
    • Andrew Chow's avatar
      check that a separator is found for psbt inputs, outputs, and global map · a3fe1254
      Andrew Chow authored
      Github-Pull: #14377
      Rebased-From: 4fb3388d
      a3fe1254
  6. 01 Dec, 2018 1 commit
    • MarcoFalke's avatar
      Merge #14196: [0.17][psbt] always drop the unnecessary utxo and convert... · 3362a95b
      MarcoFalke authored
      Merge #14196: [0.17][psbt] always drop the unnecessary utxo and convert non-witness utxo to witness when necessary
      
      fcefc685 Convert non-witness UTXOs to witness if witness sig created (Andrew Chow)
      fcdea8ad Drop the unnecessary UTXO based on the UTXOs present, not on earlier wallet things (Andrew Chow)
      
      Pull request description:
      
        When we sign an input in a psbt that has a non-witness utxo but a witness signature is produced, we will now replace the non-witness utxo with the corresponding witness utxo. Furthermore, we should make sure that the correct UTXO type is used based on what UTXOs are there, not based on earlier wallet behavior.
      
        Note that this is PR'd to the 0.17 branch because the code here no longer exists in master.
      
      Tree-SHA512: 882e9e4e9b77d6ac1743c35c0d59023aad6f4f19193398f97f2c6b81f6627d74e5220b1d674a0edba1ff2fc2a7f61afbf838d3faf0a964fccd3dee97c631aa47
      3362a95b
  7. 30 Nov, 2018 7 commits
  8. 29 Nov, 2018 4 commits