|
@ -234,14 +234,14 @@ class Test_LNBase(unittest.TestCase): |
|
|
|
|
|
|
|
|
def test_per_commitment_secret_from_seed(self): |
|
|
def test_per_commitment_secret_from_seed(self): |
|
|
self.assertEqual(bh2u(0x915c75942a26bb3a433a8ce2cb0427c29ec6c1775cfc78328b57f6ba7bfeaa9c.to_bytes(byteorder="big", length=32)), |
|
|
self.assertEqual(bh2u(0x915c75942a26bb3a433a8ce2cb0427c29ec6c1775cfc78328b57f6ba7bfeaa9c.to_bytes(byteorder="big", length=32)), |
|
|
bh2u(get_per_commitment_secret_from_seed(0x0101010101010101010101010101010101010101010101010101010101010101, 1).to_bytes(byteorder="big", length=32))) |
|
|
bh2u(get_per_commitment_secret_from_seed(0x0101010101010101010101010101010101010101010101010101010101010101, 47, 1).to_bytes(byteorder="big", length=32))) |
|
|
|
|
|
|
|
|
self.assertEqual(bh2u(0x02a40c85b6f28da08dfdbe0926c53fab2de6d28c10301f8f7c4073d5e42e3148.to_bytes(byteorder="big", length=32)), |
|
|
self.assertEqual(bh2u(0x02a40c85b6f28da08dfdbe0926c53fab2de6d28c10301f8f7c4073d5e42e3148.to_bytes(byteorder="big", length=32)), |
|
|
bh2u(get_per_commitment_secret_from_seed(0x0000000000000000000000000000000000000000000000000000000000000000, 281474976710655).to_bytes(byteorder="big", length=32))) |
|
|
bh2u(get_per_commitment_secret_from_seed(0x0000000000000000000000000000000000000000000000000000000000000000, 47, 281474976710655).to_bytes(byteorder="big", length=32))) |
|
|
#self.assertEqual(0x7cc854b54e3e0dcdb010d7a3fee464a9687be6e8db3be6854c475621e007a5dc, |
|
|
self.assertEqual(0x7cc854b54e3e0dcdb010d7a3fee464a9687be6e8db3be6854c475621e007a5dc, |
|
|
# get_per_commitment_secret_from_seed(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, 281474976710655)) |
|
|
get_per_commitment_secret_from_seed(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, 47, 281474976710655)) |
|
|
#self.assertEqual(0x56f4008fb007ca9acf0e15b054d5c9fd12ee06cea347914ddbaed70d1c13a528, |
|
|
self.assertEqual(0x56f4008fb007ca9acf0e15b054d5c9fd12ee06cea347914ddbaed70d1c13a528, |
|
|
# get_per_commitment_secret_from_seed(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, 0xaaaaaaaaaaa)) |
|
|
get_per_commitment_secret_from_seed(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, 47, 0xaaaaaaaaaaa)) |
|
|
#self.assertEqual(0x9015daaeb06dba4ccc05b91b2f73bd54405f2be9f217fbacd3c5ac2e62327d31, |
|
|
self.assertEqual(0x9015daaeb06dba4ccc05b91b2f73bd54405f2be9f217fbacd3c5ac2e62327d31, |
|
|
# get_per_commitment_secret_from_seed(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, 0x555555555555)) |
|
|
get_per_commitment_secret_from_seed(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, 47, 0x555555555555)) |
|
|
|
|
|
|
|
|