psbt: set the witness script to null, also

Otherwise libwally pushes the psbt-key for 'witness script' onto the
serialized version and we fail the 'is this identical' check.

Relevant line from libwally, where if bytes, we push a psbt_key.

```
static void push_typed_varbuff(unsigned char **cursor, size_t *max,
                               uint64_t type,
                               const unsigned char *bytes, size_t bytes_len)
{
    if (bytes) {
        push_psbt_key(cursor, max, type, NULL, 0);
        push_varbuff(cursor, max, bytes, bytes_len);
    }
}
```

Reported-By: @grubles
Changelog-Fixed: openchannel_signed would fail on PSBT comparison of materially identical PSBTs
This commit is contained in:
niftynei
2021-08-31 13:17:56 -05:00
committed by Christian Decker
parent 1782ae8590
commit 0f05238e97
2 changed files with 12 additions and 1 deletions

File diff suppressed because one or more lines are too long