bitcoin/src/util
Samuel Dobson 4f802e59a0
Merge #17509: gui: save and load PSBT
764bfe4cba [psbt] add file size limit (Sjors Provoost)
1cd8dc2556 [gui] load PSBT (Sjors Provoost)
f6895301f7 [gui] save PSBT to file (Sjors Provoost)
1d05a9d80b Move DEFAULT_MAX_RAW_TX_FEE_RATE to node/transaction.h (Sjors Provoost)
86e22d23bb [util] GetFileSize (Sjors Provoost)
6ab3aad9a5 [gui] send dialog: split on_sendButton_clicked (Sjors Provoost)

Pull request description:

  This adds:
  * a dialog after Create Unsigned, which lets you save a PSBT file in binary format, e.g. to an SD card
  * a "Load PSBT" menu entry lets you pick a PSBT file. We broadcast the transaction if complete

  ## Save flow
  <img width="482" alt="Schermafbeelding 2020-01-04 om 20 39 34" src="https://user-images.githubusercontent.com/10217/71765684-ba60d580-2f32-11ea-8dea-0c4398eb6e15.png">

  <img width="287" alt="Schermafbeelding 2020-01-04 om 20 40 35" src="https://user-images.githubusercontent.com/10217/71765677-a0bf8e00-2f32-11ea-8172-12dfd34a89f3.png">

  <img width="594" alt="Schermafbeelding 2020-01-04 om 20 41 12" src="https://user-images.githubusercontent.com/10217/71765681-aa48f600-2f32-11ea-8e2c-c4f6bf9f5309.png">

  <img width="632" alt="Schermafbeelding 2020-01-04 om 20 41 28" src="https://user-images.githubusercontent.com/10217/71765691-d19fc300-2f32-11ea-97ff-70f5dd59987a.png">

  By default the file name contains the destination address(es) and amount(s).

  We only use the binary format for files, in order to avoid compatibility hell. If we do want to add base64 file format support, we should use a different extension for that (`.psbt64`?).

  ## Load flow

  Select a file:
  <img width="649" alt="Schermafbeelding 2020-01-04 om 21 08 57" src="https://user-images.githubusercontent.com/10217/71766089-2ba28780-2f37-11ea-875d-074794b5707d.png">

  Offer to send if complete:

  <img width="308" alt="Schermafbeelding 2020-01-04 om 21 09 06" src="https://user-images.githubusercontent.com/10217/71766088-2a715a80-2f37-11ea-807d-394c8b840c59.png">

  Tell user if signatures are missing, offer to copy to clipboard:
  <img width="308" alt="Schermafbeelding 2020-01-04 om 21 15 57" src="https://user-images.githubusercontent.com/10217/71766115-702e2300-2f37-11ea-9f62-a6ede499c0fa.png">

  Incomplete for another reason:

  <img width="309" alt="Schermafbeelding 2020-01-04 om 21 07 51" src="https://user-images.githubusercontent.com/10217/71766090-2c3b1e00-2f37-11ea-8a22-6188377b67a1.png">

ACKs for top commit:
  instagibbs:
    re-ACK  764bfe4cba
  achow101:
    ACK 764bfe4cba
  jb55:
    Tested ACK 764bfe4cba
  jonatack:
    ACK 764bfe4c
  promag:
    Code review ACK 764bfe4cba.

Tree-SHA512: d284ed6895f3a271fb8ff879aac388ad217ddc13f72074725608e1c3d6d90650f6dc9e9e254479544dd71fc111516b02c8ff92158153208dc40fb2726b37d063
2020-04-23 13:16:23 +12:00
..
asmap.cpp scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
asmap.h Add asmap utility which queries a mapping 2019-12-18 14:27:03 -05:00
bip32.cpp scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
bip32.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
bytevectorhash.cpp blockfilter: Use unordered_set instead of set in blockfilter. 2018-11-05 09:30:56 -08:00
bytevectorhash.h blockfilter: Use unordered_set instead of set in blockfilter. 2018-11-05 09:30:56 -08:00
check.h util: Add CHECK_NONFATAL and use it in src/rpc 2019-10-18 17:19:36 -04:00
error.cpp scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
error.h scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
fees.cpp scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
fees.h scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
golombrice.h tests: Add fuzzing harness for Golomb-Rice coding (GolombRiceEncode/GolombRiceDecode) 2020-04-20 14:57:48 +00:00
macros.h refactor: consolidate PASTE macros 2019-09-25 10:56:00 -04:00
memory.h scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
message.cpp Move direct calls to MessageSign into new SignMessage functions in CWallet and ScriptPubKeyMan 2020-03-09 11:16:20 -04:00
message.h Move direct calls to MessageSign into new SignMessage functions in CWallet and ScriptPubKeyMan 2020-03-09 11:16:20 -04:00
moneystr.cpp scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
moneystr.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
rbf.cpp scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
rbf.h scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
settings.cpp refactor: Remove null setting check in GetSetting() 2019-11-13 15:23:06 -05:00
settings.h util: Document why ArgsManager (con/de)structor is not inline 2020-04-16 12:26:09 -04:00
spanparsing.cpp scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
spanparsing.h scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
strencodings.cpp scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
strencodings.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
string.cpp util: Add Join helper to join a list of strings 2019-08-20 16:51:41 -04:00
string.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
system.cpp Merge #17509: gui: save and load PSBT 2020-04-23 13:16:23 +12:00
system.h Merge #17509: gui: save and load PSBT 2020-04-23 13:16:23 +12:00
threadnames.cpp scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
threadnames.h scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
time.cpp scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
time.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
translation.h MOVEONLY: Move key handling code out of wallet to keyman file 2019-10-25 19:20:24 -04:00
url.cpp scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
url.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
vector.h Add some general std::vector utility functions 2019-10-16 08:56:57 -07:00