mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-14 03:30:02 +00:00
tests: multisig field set to None
This commit is contained in:
parent
01317eef18
commit
b7e4fe02a9
@ -19,21 +19,25 @@ class TestSegwitBip143NativeP2WPKH(unittest.TestCase):
|
||||
prev_index=0,
|
||||
amount=625000000, # 6.25 btc
|
||||
script_type=InputScriptType.SPENDWITNESS,
|
||||
multisig=None,
|
||||
sequence=0xffffffee)
|
||||
inp2 = TxInputType(address_n=[1],
|
||||
# Trezor expects hash in reversed format
|
||||
prev_hash=unhexlify('8ac60eb9575db5b2d987e29f301b5b819ea83a5c6579d282d189cc04b8e151ef'),
|
||||
prev_index=1,
|
||||
multisig=None,
|
||||
amount=600000000, # 6 btc
|
||||
script_type=InputScriptType.SPENDWITNESS,
|
||||
sequence=0xffffffff)
|
||||
out1 = TxOutputType(address='1Cu32FVupVCgHkMMRJdYJugxwo2Aprgk7H', # derived
|
||||
amount=0x0000000006b22c20,
|
||||
script_type=OutputScriptType.PAYTOADDRESS,
|
||||
multisig=None,
|
||||
address_n=None)
|
||||
out2 = TxOutputType(address='16TZ8J6Q5iZKBWizWzFAYnrsaox5Z5aBRV', # derived
|
||||
amount=0x000000000d519390,
|
||||
script_type=OutputScriptType.PAYTOADDRESS,
|
||||
multisig=None,
|
||||
address_n=None)
|
||||
|
||||
def test_prevouts(self):
|
||||
|
@ -17,16 +17,19 @@ class TestSegwitBip143(unittest.TestCase):
|
||||
# Trezor expects hash in reversed format
|
||||
prev_hash=unhexlify('77541aeb3c4dac9260b68f74f44c973081a9d4cb2ebe8038b2d70faa201b6bdb'),
|
||||
prev_index=1,
|
||||
multisig=None,
|
||||
amount=1000000000, # 10 btc
|
||||
script_type=InputScriptType.SPENDP2SHWITNESS, # TODO: is this correct?
|
||||
sequence=0xfffffffe)
|
||||
out1 = TxOutputType(address='1Fyxts6r24DpEieygQiNnWxUdb18ANa5p7',
|
||||
amount=0x000000000bebb4b8,
|
||||
script_type=OutputScriptType.PAYTOADDRESS,
|
||||
multisig=None,
|
||||
address_n=None)
|
||||
out2 = TxOutputType(address='1Q5YjKVj5yQWHBBsyEBamkfph3cA6G9KK8',
|
||||
amount=0x000000002faf0800,
|
||||
script_type=OutputScriptType.PAYTOADDRESS,
|
||||
multisig=None,
|
||||
address_n=None)
|
||||
|
||||
def test_bip143_prevouts(self):
|
||||
|
@ -43,12 +43,14 @@ class TestSignSegwitTxNativeP2WPKH(unittest.TestCase):
|
||||
amount=5000000,
|
||||
script_type=OutputScriptType.PAYTOADDRESS,
|
||||
address_n=None,
|
||||
multisig=None,
|
||||
)
|
||||
out2 = TxOutputType(
|
||||
address='tb1q694ccp5qcc0udmfwgp692u2s2hjpq5h407urtu',
|
||||
script_type=OutputScriptType.PAYTOADDRESS,
|
||||
amount=12300000 - 11000 - 5000000,
|
||||
address_n=None,
|
||||
multisig=None,
|
||||
)
|
||||
tx = SignTx(coin_name='Testnet', version=None, lock_time=None, inputs_count=1, outputs_count=2)
|
||||
|
||||
@ -135,13 +137,15 @@ class TestSignSegwitTxNativeP2WPKH(unittest.TestCase):
|
||||
address='2N4Q5FhU2497BryFfUgbqkAJE87aKHUhXMp',
|
||||
amount=5000000,
|
||||
script_type=OutputScriptType.PAYTOADDRESS,
|
||||
address_n=None, # TODO: ask honza about sanitizing
|
||||
address_n=None,
|
||||
multisig=None,
|
||||
)
|
||||
out2 = TxOutputType(
|
||||
address=None,
|
||||
address_n=[49 | 0x80000000, 1 | 0x80000000, 0 | 0x80000000, 1, 0],
|
||||
script_type=OutputScriptType.PAYTOWITNESS,
|
||||
amount=12300000 - 11000 - 5000000,
|
||||
multisig=None,
|
||||
)
|
||||
tx = SignTx(coin_name='Testnet', version=None, lock_time=None, inputs_count=1, outputs_count=2)
|
||||
|
||||
|
@ -43,12 +43,14 @@ class TestSignSegwitTxP2WPKHInP2SH(unittest.TestCase):
|
||||
amount=12300000,
|
||||
script_type=OutputScriptType.PAYTOADDRESS,
|
||||
address_n=None,
|
||||
multisig=None,
|
||||
)
|
||||
out2 = TxOutputType(
|
||||
address='2N1LGaGg836mqSQqiuUBLfcyGBhyZbremDX',
|
||||
script_type=OutputScriptType.PAYTOADDRESS,
|
||||
amount=123456789 - 11000 - 12300000,
|
||||
address_n=None,
|
||||
multisig=None,
|
||||
)
|
||||
tx = SignTx(coin_name='Testnet', version=None, lock_time=None, inputs_count=1, outputs_count=2)
|
||||
|
||||
@ -136,12 +138,14 @@ class TestSignSegwitTxP2WPKHInP2SH(unittest.TestCase):
|
||||
amount=12300000,
|
||||
script_type=OutputScriptType.PAYTOADDRESS,
|
||||
address_n=None,
|
||||
multisig=None,
|
||||
)
|
||||
out2 = TxOutputType(
|
||||
address_n=[49 | 0x80000000, 1 | 0x80000000, 0 | 0x80000000, 1, 0],
|
||||
script_type=OutputScriptType.PAYTOP2SHWITNESS,
|
||||
amount=123456789 - 11000 - 12300000,
|
||||
address=None, # TODO: ask about sanitizing
|
||||
address=None,
|
||||
multisig=None,
|
||||
)
|
||||
tx = SignTx(coin_name='Testnet', version=None, lock_time=None, inputs_count=1, outputs_count=2)
|
||||
|
||||
@ -249,12 +253,14 @@ class TestSignSegwitTxP2WPKHInP2SH(unittest.TestCase):
|
||||
amount=8,
|
||||
script_type=OutputScriptType.PAYTOADDRESS,
|
||||
address_n=None,
|
||||
multisig=None,
|
||||
)
|
||||
out2 = TxOutputType(
|
||||
address_n=[49 | 0x80000000, 1 | 0x80000000, 0 | 0x80000000, 1, 0],
|
||||
script_type=OutputScriptType.PAYTOP2SHWITNESS,
|
||||
amount=1,
|
||||
address=None,
|
||||
multisig=None,
|
||||
)
|
||||
tx = SignTx(coin_name='Testnet', version=None, lock_time=None, inputs_count=1, outputs_count=2)
|
||||
|
||||
|
@ -28,15 +28,18 @@ class TestSignTxFeeThreshold(unittest.TestCase):
|
||||
pinp1 = TxInputType(script_sig=unhexlify('483045022072ba61305fe7cb542d142b8f3299a7b10f9ea61f6ffaab5dca8142601869d53c0221009a8027ed79eb3b9bc13577ac2853269323434558528c6b6a7e542be46e7e9a820141047a2d177c0f3626fc68c53610b0270fa6156181f46586c679ba6a88b34c6f4874686390b4d92e5769fbb89c8050b984f4ec0b257a0e5c4ff8bd3b035a51709503'),
|
||||
prev_hash=unhexlify('c16a03f1cf8f99f6b5297ab614586cacec784c2d259af245909dedb0e39eddcf'),
|
||||
prev_index=1,
|
||||
multisig=None,
|
||||
script_type=None,
|
||||
sequence=None)
|
||||
pinp2 = TxInputType(script_sig=unhexlify('48304502200fd63adc8f6cb34359dc6cca9e5458d7ea50376cbd0a74514880735e6d1b8a4c0221008b6ead7fe5fbdab7319d6dfede3a0bc8e2a7c5b5a9301636d1de4aa31a3ee9b101410486ad608470d796236b003635718dfc07c0cac0cfc3bfc3079e4f491b0426f0676e6643a39198e8e7bdaffb94f4b49ea21baa107ec2e237368872836073668214'),
|
||||
prev_hash=unhexlify('1ae39a2f8d59670c8fc61179148a8e61e039d0d9e8ab08610cb69b4a19453eaf'),
|
||||
prev_index=1,
|
||||
multisig=None,
|
||||
script_type=None,
|
||||
sequence=None)
|
||||
pout1 = TxOutputBinType(script_pubkey=unhexlify('76a91424a56db43cf6f2b02e838ea493f95d8d6047423188ac'),
|
||||
amount=390000,
|
||||
multisig=None,
|
||||
address_n=None)
|
||||
|
||||
inp1 = TxInputType(address_n=[0], # 14LmW5k4ssUrtbAB4255zdqv3b4w1TuX9e
|
||||
@ -49,6 +52,7 @@ class TestSignTxFeeThreshold(unittest.TestCase):
|
||||
sequence=None)
|
||||
out1 = TxOutputType(address='1MJ2tj2ThBE62zXbBYA5ZaN3fdve5CPAz1',
|
||||
amount=390000 - 100000, # fee increased to 100000 => too high
|
||||
multisig=None,
|
||||
script_type=OutputScriptType.PAYTOADDRESS,
|
||||
address_n=None)
|
||||
tx = SignTx(coin_name=None, version=None, lock_time=None, inputs_count=1, outputs_count=1)
|
||||
@ -91,14 +95,17 @@ class TestSignTxFeeThreshold(unittest.TestCase):
|
||||
prev_hash=unhexlify('c16a03f1cf8f99f6b5297ab614586cacec784c2d259af245909dedb0e39eddcf'),
|
||||
prev_index=1,
|
||||
script_type=None,
|
||||
multisig=None,
|
||||
sequence=None)
|
||||
pinp2 = TxInputType(script_sig=unhexlify('48304502200fd63adc8f6cb34359dc6cca9e5458d7ea50376cbd0a74514880735e6d1b8a4c0221008b6ead7fe5fbdab7319d6dfede3a0bc8e2a7c5b5a9301636d1de4aa31a3ee9b101410486ad608470d796236b003635718dfc07c0cac0cfc3bfc3079e4f491b0426f0676e6643a39198e8e7bdaffb94f4b49ea21baa107ec2e237368872836073668214'),
|
||||
prev_hash=unhexlify('1ae39a2f8d59670c8fc61179148a8e61e039d0d9e8ab08610cb69b4a19453eaf'),
|
||||
prev_index=1,
|
||||
multisig=None,
|
||||
script_type=None,
|
||||
sequence=None)
|
||||
pout1 = TxOutputBinType(script_pubkey=unhexlify('76a91424a56db43cf6f2b02e838ea493f95d8d6047423188ac'),
|
||||
amount=390000,
|
||||
multisig=None,
|
||||
address_n=None)
|
||||
|
||||
inp1 = TxInputType(address_n=[0], # 14LmW5k4ssUrtbAB4255zdqv3b4w1TuX9e
|
||||
@ -112,6 +119,7 @@ class TestSignTxFeeThreshold(unittest.TestCase):
|
||||
out1 = TxOutputType(address='1MJ2tj2ThBE62zXbBYA5ZaN3fdve5CPAz1',
|
||||
amount=390000 - 90000, # fee increased to 90000, slightly less than the threshold
|
||||
script_type=OutputScriptType.PAYTOADDRESS,
|
||||
multisig=None,
|
||||
address_n=None)
|
||||
tx = SignTx(coin_name=None, version=None, lock_time=None, inputs_count=1, outputs_count=1)
|
||||
|
||||
|
@ -53,7 +53,8 @@ class TestSignTx(unittest.TestCase):
|
||||
out1 = TxOutputType(address='1MJ2tj2ThBE62zXbBYA5ZaN3fdve5CPAz1',
|
||||
amount=390000 - 10000,
|
||||
script_type=OutputScriptType.PAYTOADDRESS,
|
||||
address_n=None)
|
||||
address_n=None,
|
||||
multisig=None)
|
||||
tx = SignTx(coin_name=None, version=None, lock_time=None, inputs_count=1, outputs_count=1)
|
||||
|
||||
messages = [
|
||||
|
Loading…
Reference in New Issue
Block a user