OSDN Git Service

add create_P2WPKH_program test data
authorChengcheng Zhang <943420582@qq.com>
Mon, 7 Jan 2019 09:00:57 +0000 (17:00 +0800)
committerChengcheng Zhang <943420582@qq.com>
Mon, 7 Jan 2019 09:00:57 +0000 (17:00 +0800)
app/model/receiver.py

index e51897a..2734dce 100644 (file)
@@ -40,6 +40,36 @@ def get_path_from_index(account_index_int, address_index_int, change_bool):
     return path_list
 
 
+# create_P2WPKH_program create control program
+# You can get more test data from: https://gist.github.com/zcc0721/afa12de04b03b9bfc49985a181ebda80
+# Please attention:
+#   account_index_int >= 1
+#   address_index_int >= 1
+#   change_bool: true or false
+# test data 1:
+#   account_index_int: 1
+#   address_index_int: 1
+#   change_bool: false
+#   xpub_str: 3c6664244d2d57168d173c4691dbf8741a67d972b2d3e1b0067eb825e2005d20c5eebd1c26ccad4de5142d7c339bf62cc1fb79a8b3e42a708cd521368dbc9286
+#   control_program_str: 0014052620b86a6d5e07311d5019dffa3864ccc8a6bd
+# test data 2:
+#   account_index_int: 1
+#   address_index_int: 1
+#   change_bool: true
+#   xpub_str: 3c6664244d2d57168d173c4691dbf8741a67d972b2d3e1b0067eb825e2005d20c5eebd1c26ccad4de5142d7c339bf62cc1fb79a8b3e42a708cd521368dbc9286
+#   control_program: 001478c3aa31753389fcde04d33d0779bdc2840f0ad4
+# test data 3:
+#   account_index_int: 1
+#   address_index_int: 17
+#   change_bool: true
+#   xpub_str: 3c6664244d2d57168d173c4691dbf8741a67d972b2d3e1b0067eb825e2005d20c5eebd1c26ccad4de5142d7c339bf62cc1fb79a8b3e42a708cd521368dbc9286
+#   control_program: 0014eefb8d0688d7960dfbd79bb3aa1bcaa3ec34415d
+# test data 4:
+#   account_index_int: 1
+#   address_index_int: 1
+#   change_bool: false
+#   xpub_str: f744493a021b65814ea149118c98aae8d1e217de29fefb7b2024ca341cd834586ee48bbcf1f4ae801ecb8c6784b044fc62a74c58c816d14537e1573c3e20ce79
+#   control_program: 001431f2b90b469e89361225aae370f73e5473b9852b
 def create_P2WPKH_program(account_index_int, address_index_int, change_bool, xpub_str):
     path_list = get_path_from_index(account_index_int, address_index_int, change_bool)
     child_xpub_str = xpub_to_child_xpub(xpub_str, path_list)