Skip to content

Commit 399906a

Browse files
LeoComandiniLawrence Nahum
authored andcommitted
SWIG python: fix scriptpubkey_to_address
1 parent 8faa785 commit 399906a

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/swig_python/contrib/address.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def test_b58_address(self):
1818
('H5nswXhfo8AMt159sgA5FWT35De34hVR4o', h2b('a914f80278b2011573a2ac59c83fadf929b0fc57ad0187'), WALLY_NETWORK_LIQUID),
1919
]:
2020
self.assertEqual(address_to_scriptpubkey(address, network), scriptpubkey)
21+
self.assertEqual(scriptpubkey_to_address(scriptpubkey, network), address)
2122

2223
if __name__ == '__main__':
2324
unittest.main()

src/swig_python/swig.i

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ static void destroy_words(PyObject *obj) { (void)obj; }
207207
%pybuffer_nullable_binary(const unsigned char *pub_key, size_t pub_key_len);
208208
%pybuffer_nonnull_binary(const unsigned char *salt, size_t salt_len);
209209
%pybuffer_nullable_binary(const unsigned char *script, size_t script_len);
210+
%pybuffer_nullable_binary(const unsigned char *scriptpubkey, size_t scriptpubkey_len);
210211
%pybuffer_nonnull_binary(const unsigned char *sig, size_t sig_len);
211212
%pybuffer_nonnull_binary(const unsigned char *sighash, size_t sighash_len);
212213
%pybuffer_nonnull_binary(const unsigned char *txhash, size_t txhash_len);

0 commit comments

Comments
 (0)