Skip to content

Commit

Permalink
Merge #204: tx: add discount_weight and discount_vsize
Browse files Browse the repository at this point in the history
b7fc82e tx: add discount_weight and discount_vsize (Byron Hambly)

Pull request description:

  adds implementation of discount virtual size from ElementsProject/elements#1317

  same test vectors in ElementsProject/elements#1341

ACKs for top commit:
  apoelstra:
    ACK b7fc82e

Tree-SHA512: 48f0daafcb93bbcabacff4bb5cd5bc6b2dd99fb97117671f58d2b33c9b9e6357e01eb16d726dcbeb70375c6307b106a11d091604aafde148b5c8377f471e46f1
  • Loading branch information
apoelstra committed Jul 2, 2024
2 parents 9cbb637 + b7fc82e commit 04dd353
Show file tree
Hide file tree
Showing 11 changed files with 122 additions and 0 deletions.
112 changes: 112 additions & 0 deletions src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,34 @@ impl Transaction {
(weight + 4 - 1) / 4
}

/// Get the "discount weight" of this transaction; this is the weight minus the output witnesses and minus the
/// differences between asset and nonce commitments from their explicit values.
pub fn discount_weight(&self) -> usize {
let mut weight = self.scaled_size(4);

for out in self.output.iter() {
let rp_len = out.witness.rangeproof_len();
let sp_len = out.witness.surjectionproof_len();
let witness_weight = VarInt(sp_len as u64).size() + sp_len + VarInt(rp_len as u64).size() + rp_len;
weight -= witness_weight.saturating_sub(2); // explicit transactions have 1 byte for each empty proof
if out.value.is_confidential() {
weight -= 33 - 9;
}
if out.nonce.is_confidential() {
weight -= 33 - 1;
}
}

weight
}

/// Returns the "discount virtual size" (discountvsize) of this transaction.
///
/// Will be `ceil(discount weight / 4.0)`.
pub fn discount_vsize(&self) -> usize {
(self.discount_weight() + 4 - 1) / 4
}

fn scaled_size(&self, scale_factor: usize) -> usize {
let witness_flag = self.has_witness();

Expand Down Expand Up @@ -2399,4 +2427,88 @@ mod tests {
");
assert!(input.pegin_data().is_none());
}

#[test]
fn discount_vsize() {
let tx: Transaction = hex_deserialize!(include_str!("../tests/data/1in2out_pegin.hex"));
assert_eq!(tx.input.len(), 1);
assert!(tx.input[0].is_pegin());
assert_eq!(tx.output.len(), 2);
assert_eq!(tx.weight(), 2403);
assert_eq!(tx.vsize(), 601);
assert_eq!(tx.discount_weight(), 2403);
assert_eq!(tx.discount_vsize(), 601);

let tx: Transaction = hex_deserialize!(include_str!("../tests/data/1in2out_tx.hex"));
assert_eq!(tx.input.len(), 1);
assert_eq!(tx.output.len(), 2);
assert_eq!(tx.weight(), 5330);
assert_eq!(tx.vsize(), 1333);
assert_eq!(tx.discount_weight(), 1031);
assert_eq!(tx.discount_vsize(), 258);

let tx: Transaction = hex_deserialize!(include_str!("../tests/data/1in3out_tx.hex"));
assert_eq!(tx.input.len(), 1);
assert_eq!(tx.output.len(), 3);
assert_eq!(tx.weight(), 10107);
assert_eq!(tx.vsize(), 2527);
assert_eq!(tx.discount_weight(), 1509);
assert_eq!(tx.discount_vsize(), 378);

let tx: Transaction = hex_deserialize!(include_str!("../tests/data/2in3out_exp.hex"));
assert_eq!(tx.input.len(), 2);
assert_eq!(tx.output.len(), 3);
assert_eq!(tx.weight(), 1302);
assert_eq!(tx.vsize(), 326);
assert_eq!(tx.discount_weight(), 1302);
assert_eq!(tx.discount_vsize(), 326);

let tx: Transaction = hex_deserialize!(include_str!("../tests/data/2in3out_tx.hex"));
assert_eq!(tx.input.len(), 2);
assert_eq!(tx.output.len(), 3);
assert_eq!(tx.weight(), 10300);
assert_eq!(tx.vsize(), 2575);
assert_eq!(tx.discount_weight(), 1638);
assert_eq!(tx.discount_vsize(), 410);

let tx: Transaction = hex_deserialize!(include_str!("../tests/data/2in3out_tx2.hex"));
assert_eq!(tx.input.len(), 2);
assert_eq!(tx.output.len(), 3);
assert_eq!(tx.weight(), 10536);
assert_eq!(tx.vsize(), 2634);
assert_eq!(tx.discount_weight(), 1874);
assert_eq!(tx.discount_vsize(), 469);

let tx: Transaction = hex_deserialize!(include_str!("../tests/data/3in3out_tx.hex"));
assert_eq!(tx.input.len(), 3);
assert_eq!(tx.output.len(), 3);
assert_eq!(tx.weight(), 10922);
assert_eq!(tx.vsize(), 2731);
assert_eq!(tx.discount_weight(), 2196);
assert_eq!(tx.discount_vsize(), 549);

let tx: Transaction = hex_deserialize!(include_str!("../tests/data/4in3out_tx.hex"));
assert_eq!(tx.input.len(), 4);
assert_eq!(tx.output.len(), 3);
assert_eq!(tx.weight(), 11192);
assert_eq!(tx.vsize(), 2798);
assert_eq!(tx.discount_weight(), 2466);
assert_eq!(tx.discount_vsize(), 617);

let tx: Transaction = hex_deserialize!(include_str!("../tests/data/2in4out_tx.hex"));
assert_eq!(tx.input.len(), 2);
assert_eq!(tx.output.len(), 4);
assert_eq!(tx.weight(), 15261);
assert_eq!(tx.vsize(), 3816);
assert_eq!(tx.discount_weight(), 2268);
assert_eq!(tx.discount_vsize(), 567);

let tx: Transaction = hex_deserialize!(include_str!("../tests/data/2in5out_tx.hex"));
assert_eq!(tx.input.len(), 2);
assert_eq!(tx.output.len(), 5);
assert_eq!(tx.weight(), 20030);
assert_eq!(tx.vsize(), 5008);
assert_eq!(tx.discount_weight(), 2706);
assert_eq!(tx.discount_vsize(), 677);
}
}
1 change: 1 addition & 0 deletions tests/data/1in2out_pegin.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
020000000101557e4c2f0628dfac37ac4411cb6e35dd225c9ba5addff102862daae41b637c990b00004000ffffffff02016d521c38ec1ea15734ae22b7c46064412829c0d0579f0a713d1c04ede979026f0100000000000beb6d0016001421716e7df11103ea809accf1ab2bdd4080449eb7016d521c38ec1ea15734ae22b7c46064412829c0d0579f0a713d1c04ede979026f010000000000000042000000000000000002473044022001a6072622c5e93729239647c2fe7f66f272d7aa2812d7438007e334ee474bde02204ffdcfbbd604587577e025ae934cd99e81462338fdc02599a2d38992b389f37001210255a1c00e0dd2116252a5eb25972d0fea758cad0ab7a5d24878f9d6a19727c1a20608afeb0b0000000000206d521c38ec1ea15734ae22b7c46064412829c0d0579f0a713d1c04ede979026f206fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d619000000000016001441fd857c961affbcbf2e4d1045c566e67d76dfd5fde703020000000e6d76937ac1018b78fe283a8944a814ece2140f11ec5179c7d3c492b825131c6c0a00000000feffffff18e04258d7c83015edf8136fc1bf8f2131d9b68af090260b00d9a0bfdf6010d80b00000000feffffff8efa3a72e3733ba0e9eac82d8a2cb4e793ea62d300f7b30cdd233ffe108e9d6b0c00000000feffffffac11c2632695df72aec04ce04a25de4b37458f601661b7ead396d05182c3f17c0700000000feffffffaeead849b5299e24e4d57561dba357991b0a45520cad3b688e6ca7cb28a40f860b00000000feffffff416d0631f4d5cea49b2792788a61ec794080a73dd8935dbf445144f6c0e0810b0c00000000feffffffe3682c1aaf6a5af8a9e2892aadb43d7d496dce911fd3c12cee8d42491eab00780b00000000feffffffe3682c1aaf6a5af8a9e2892aadb43d7d496dce911fd3c12cee8d42491eab00780600000000fefffffffef923d8b219b40eb7c337c5c2fa70dec7f1dbbe7b6b487ccfac6b191fbfaf790300000000feffffff07ff63b29dd68b4eff0a45c8830f7d4a9908287ec919c9e8d9999510c14b02a10800000000feffffff7671526352f34e9f8acaa93648152ff5409510448aef3657aaaf44023cb23bcf0900000000feffffffabf32bbcae8e67f53871b1ee5d0b5a49810386df6c122ae0f6b1c676b59e17480800000000feffffffb8a915b1d5afe373c2f753373cf98256cf4e8a960d285cb62cd9394f2316a8b40700000000feffffffb353ab262b8d23ba4b67bab0adde47836f9a63d5f597221aba8e7b6516c8e5b50c00000000feffffff0d7e8a9b0100000000160014cdf10594603564acd1ebff1596740d7a27da04a9afb4db0700000000160014e311d2f332c317fd792efd1eca1e3ebd60f5262f4e0a62040000000016001443d7e7908e36b3d674f022da05ec223c3589e93c4e0a620400000000160014506a6a3582c9916d49f946e555dac4090fafa21ba373820000000000160014724716f7fbbe5cce379d28df2bdb57101bf4b0b34e0a6204000000001600149b5ba30ba73140301e2c06013ec8743baae9b5964e0a620400000000160014e9a45eede70eedea3c79e2df76fb2ad176b018298591020000000000160014fc53c7d9e1f378f10f0a02f392bddd5cb4b6e7f64e0a620400000000160014dceadbe1d19b5f01cd297326c052182863e0c75f2c853b0200000000160014c1d31cc004ab8a852d09e0f1b21b9612ca557cdd4e0a6204000000001600147ce8ff3fe3a455de4c7556beae19530015bd2619afeb0b0000000000220020b29f97a86251ea0030726261d7703f4015d2644a8f47c9da24468370f9f2f4614e0a6204000000001600144a617e14b88cd99aecd587b60dbb8f7495302531e7e70c00fd1a0200000520dfb88d3a4d93486a906de316f7d36b9aadbe0665cf4e0000000000000000000051e75174de68a0846322c6807468a8d2e9d3ea3c06cc590d4e4bd4632acd1fbe70ae5866f0550317671357d4351000000e692fd6ac8218da7f8d3e95dc49c9a80ec07e5394ffb3a42f526294a9f8aa3f8733645a9dccd40eb4fb1c9777c28303856afd2c757ea56a0825f8955144ad3241ef8fe75a898e7ede330a18721d6745b9141ef03b7b02e6e58663b07bbfbbc2a9557e4c2f0628dfac37ac4411cb6e35dd225c9ba5addff102862daae41b637c998ec2b24d7489e27acc23b73c6191b2826e2f253745d4749f836d1da7a8430d80e32cbb8c149e8423b32f2e48701de69bca0a5b510715661076a0096ce1c6a800b4c51b4a468dec699b4f013ebc46381a55ea98faf249f936d5fe96ee4f60635134b8302c3fc41d305e116c82633fba821a2f73a9097361bffacc960b006cd69593ae8512f0bdf6121271d75b6ce43d29182e024822c745a0d216df8e69323febca09677d55fb0224c7bb7b01361c09050f5cc1e05965c404c3f2e3b6546b83326d910b78565da835fa54a0d32be2daabebb402d1a2a0e50920e61c3ddaeb0d7bde57e98ef84c8e49613c6e5fa60cf28c60e1334dd8272f8d8a636b4c59109f02760d6712f55ca5c2ba86c81dba5073980b62049fc6099dc1518eaca05c8e3026ecd20ce9d0d50c758aa8fbaeacc3a7503a449b66d740a1dc0af1252c2b5ae28804ff76010000000000
1 change: 1 addition & 0 deletions tests/data/1in2out_tx.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0200000001017b85545c658d507ff56f315c77f910dd19cc9ceb7d5e1e4d3a3f8be4a91fe7440000000000fdffffff020bb6478c61c8f5f024ded219c967314685257f0ded894eaf626a00843a6ab80412091ee78237e38fb36c8be564ecd76e65f743065522f38f838367680ed7287b459103aabd97d4c8f3eac9555edfd2a709370b802335da478b6578501f72a4d100482716001455f4f701eec6059f956a40335e317a96a5e87ab5016d521c38ec1ea15734ae22b7c46064412829c0d0579f0a713d1c04ede979026f01000000000000000e00000000000000000347304402205d62bc013832eb6a631fe0285c49b7e27846e03189a245bec8f86346382282a702206c6e839b4b1d79d74662e432b724671402a6cfa2287911677c7061a3a32abe34012042c6504afda18a302bbf935f1dc646f71872a9a2fb5ed9e0cffb64588fd0d0a865a9141243397ee5e188bdcd17c9529c1382c7f8bc0fe987632102a3cd0d865794542994737e776dc3827a046c02ea2693f1d1f64315b3557bbb8b670395f72bb17521034a2e0343a515cf7d4a583d05bec3ee9fc16758cae791c10064fa92d65672d1fe68ac004301000177ce2a14a4f9e556fc846219827e1bc584caf9ef35e761dbf1f961a89b8285bde8fbe242c6984dd28719a792cd2e63535287db9a3b1fc4e4c5ae28cc5e8973d0fd4e10603300000000000000014cf45a01f0036bec883cdd4d5d8de1d7b3f2ec125733ce2e123ef3ff0085c50fd1b8cd3101c24fd8fff0bab803cda813aad9645ca6714ce768da75da09b58851585551c425e729d6faf4186a6659ea107f4ef35cc458dae565f1337af46cde218563eb3a756dc5d532717cc775fc0d04fbf4492070eb3cd9943a12fd07939d69a71090871e1ddf8fe716e2bc3f3364783cdb1d6a704325ca6c4334171563ae7bfcc9766ab848a65f47973753b2758b4404f17e54527080cfb980d1227f70cc0e77212d06aea909c7f2ac38f4a75c387464f8b70e33061f017a6fbbccf0673d08aebae2a1ce6cf9dd8c98791b1f4d653788b2ed6dd65cf9795eac568744e386d68c89d973ca079298f8d292b6bee71fad94a0f83aaf070ccfeb6c6de20baf8c6f1083dcdd539fae6ed74832100ea7c07296c0af2201523c3abf8b784ca8a235556d5bae668f17d9a353fd49dbae623ca44830a8fc4963419e49a9dc99bf87ea0414be3b43a6eab8ce54695d66887b261c08252a501d0c78d30be1ae3fc10f557f4d228ef38da496b22c5fa79d92e2c190b9d31f286dc0e3c8489fcb8e0603f8b93a6eb1ec726a7e0015e70407da186d85b290b054747276a8928443e1108cb67738d156787d20553c39fa0449f95addbf42170fdab8107d1f93fcd841964b6e6c4c140d0c4ed1463835e603f5012a4aafd5b038ceb9b4a5b7e2688cfd8c4f2bfafaf0bb5bb1aa7a7f13bd47ff3da57c4c88b741fd9ff97abc23d4047f690d59c4c67494f47125fe0f626ad409a92d72907ad0b1762b5271f474fa552d9139fcb1103db24f7a29726a5e41a6dbc43590c14a62eb1b2aa0f160134c42c6c87c696e7c42546bb72f9f531729555d01c529570553aeec70709c3a4f9aacf810d5018f776af48b93eff8e120242105c06a32e64bfc825fde488c99d5845adba2cf349717f64e488852cca73cc5813b7872f7e89d24b4bfafdf75faa368375d5bfdd8b8a7ad641703cbff131616c77e79d8f78c5fe63810781db44fb1fa5cc9387cf0de6807d1a3d5e3d8f9ec7418bbb1d4e10b1fcdb300abd8625b4e24842f1f4c4e567fe9f8c6e9d314757d4568889bccc740fb36f0270804cc11c0044093ab9586ed034cd1eb70bacdedd573750794f0286dfb91c91308e507147ea8e8534c655b931f4e68543e93c57cf2f2159e021739943e40c0dbc8a68193218d40d71e0956b00b4a01fa9c06e67ea55e0213fab48a8dfcf3a047e8c438e7c94fc195026cec82ad532e2aa5970a9fe6c03d9088d0ab45e0b9c7bf9597bd2db93ef7d7f139c291f59e03cda1a5f9a793eb7ec6d50fa9482b712500b5e5a780319769836f7053e3c5a3276a7d65467578a7fbf9079fb5c6bb1b0558acbf3cd896644d42a7b0fd87b12b571b3d8122b1c254750bf9b097d0ec5ed31f9af7db9571f706f5909f0ef2fdcdb255a0795f5c28b70fd1d25b74eb2524ae8f47756875ff439a2b2769adc844312c4ac7bde16b561e62ee3069d25718bf6c2e11ffbb83c863a51c52ff4ead581dd6b1ff0913905163683b97ecbad003a1c71469050eed5ad79e9bb44179b90b8e6b0e6a61a0ed4e919cb96c2615b61cf93905adc3e6e2a127bd661f05e928a45bc1c0599c41450dea0182043b977fcfcf3620f765d3aab13cbe684028dc78a4bd02324427379735934ab4cb821623f49e3af05391c1b7acfe8be33c9201efeded50838ff216d6744d61e8d1d600260c8f7275a46764ac9392132f0b3661e5e92e9daa87b9329d9c89353f40a130bcf8611cce25335f9f1c1208ae1bdc47d96c3f83170a7d27367a043debdfd0e43776d330d1f7a806b32c4363d1dca14715dae4f4d1c99a92673954094e61387080353974097adfde15de4009caa28d42703fdb56fcdac47bd9c5e3bad2fbf90b4a3fab4d89a9933e445ba85f759cc149101f5045a6f3a6d741424318249d96277cea3dc0c4814763d727c72a1867618ac05e5ff103b985cc6f78829bae92794680a51c4b7f7f8b88e39ddd4471890914594f3f03ae668d501732ea77b3eb1fb38b5ad9efdac8775e0995c60a3949e84d2298ea3463aaa16d5ff633da654463e90004915ccc19663c87e006fcd05e904b85b71428d79913e3afdecb7ad51a66f7dcb738d028b62b307025d524320dbe064330da5cbd70467635cf492197c7be3513363b4000bf176827011b2894d33dc9d806b2526a6e91cc1cf0582c5330484b8d48be4855c1859a5b20cab6d08d95b42b57fc709dcb637ba9c6e70b72c473af88ebe8723fe94a0d5ee5d483f19c3b2aade19bafed774b786c0d24383fe0f71c085655f4bd78cb36da83b5429576576c0718b4549efe5b8f602c543c3a8e3d86f19b70d6be1fb39b7cbbac6fcf6d80d69c00ed44dbed1b8555593bd6dcf9ddd519f9325f6faa146d4b631cc6ee418ef9d07a0036fb26a792e7733ec0b58d9f0ebba9ea9493fa026bab62f70381e534c8c3b349be651e9fd5d472b3cbf8f7e912b7030a1992df35e17f4c5aa54f1632464a7c3b0dd133da8d436205bf45d8ded924e35b366803ee52a3d1c85d9f4f976785270dafb63d2cd5052328ed2e5381e9a6e9d8409675c2a9a43c74b07e8a3df8043b2b6d42832cabfcd495b8b30727346990fbc79e436d7ba4d7035603ab98532c5497ef493511e498b1b9c5ff413e919ab6f3cd6acc472f6a39ad0a8c9677ac9a5380a6bebbaaf13a114d097efbf140acad7edecc758bb070fa0b88bb0646d3bed911414a3f10b12bf8372d66f4525f9a8a66d7bf2b5d364119a687e5f416511c27659cf70969863ed7f80e80a4f2e55bf25721e1ab415305b66bfc25b9630a265b553d3e806807f23ec1e2a5f657dbd73a4a36e95e6616faa6aefc5143ca29b0e4bc9eb1042d99c74115d96a2eec5e7fb8c3f598d4df8fa8953e96689651a705dd3f385cd27e0173baca570ce53001cdb002e4476e6af47b9a891f84f7c1c472cce3cd4a70a40c298819f6d75e6adac193798c740c9f5f57fee4df5d140cce8ee4152c17784899003dc000cd2e7c7f23e74da085b254e0843d97d147e44ab3ba12e308925fc6ab0460c7ceb107b0900cef5ff939bc3fe5640f0bb11597c561be275fc8b5b85f5e38a3c12ea26b5b7b32e407685db70d16a3ce51043d4009a647fd3656a54adcbd4d1baa6d89881973fe32faf071123de1712e85db628bdd987566b362845d0c5f818547ec2d1f7c668cae44f0bec74c6663134dd0273c3363f31901903e4e976a447af96f6f521059fb6b892a0599cf7aae457df3aed72f1f55e145332c91430a2f8184bb917d317f8d9c4b6769b9a3a0ac5baea88b39b8f7662ecc16585e7166f61a948f48e6d30c2cfd82820cccdf5e722db2156bd848ea4d13c92544d1d9064414a305215a8271631ffebf08cdf0bcbbbd939f78eafec0d7238bdb90f211d6c44589187d1a501eef7d0b6118e028afcf76ffda95a43e2211206d9d50d34c3e33a6c991952ccd73e722802a14227692f037bba585e73cb9a6cd7556f9ec2158f197a51e3884afb8e59eaa8e7ac3568d88b27b2a5ab8cd72648193ff6068e4d481c58c117e2adda564d5a49f6b992ff6f938acb283e7baf704c71861d60b263f6c6684d7544878b7aca942af8b3a70ae0def309b68fac2aed2b11ba753d7b47f7369805e5b3b9b41d22196e2cc098ece59bdf5231b03fba8adae08fee227a582490b0db34c115620c72afb6fcb507397d1333ea19e7969b729bc2733e6546d2d9f3edb08f9c74201f9ed4e3fcb446cc3fd688b1345e97b32492c9173fa71df2772bd825506ddd6447e9f9e8ece0ffb860e1c755bcf2400deef094219795d4ee84acc34dedc9a3b3adf7fc81733bc511b8edcb54769400940b53471d8e82cb82d9967a97297bdd87f165968ea046291234da176efd20889aa4c07179df83cb500b40bdb96b0c27f2bfa57353268b776740432d29f1761fee77755c7b219def785a42b683e1f70240ec45cdf660e894d4fb541d0511547c9a2c503cf605d72ea7f2abaee4e8adc222a82f4b86c34ad8b25e2932df02f0090d2dbf8817c44659b1245d5579277ad406c538914f90dbaefdd110c5ca0d63a24706cd51096ec19f819c446c9fcb55b777ae633f0257dc4d1b293e6ef68ea7867d852058212a0a9ace9442422a638f73dfb14cc4354b6481ee6591037e7287e962037d963b38a7e4ec12b30e0f6e0ee4d8c30d288e99e22e43b4c795c51d66cc4225c5cab3685b1b3a6fd3a82dfc355634b347cc4f4e55413728fb67fb9f34d3f7e4ecce3254ea843ab361b0f652faa9e54470e3e414c1bb2593e36d88109c36dfab505a16c19152fe021de608c6b3d924c981231ea9cf1cf8c93e53f0df78033e81fdb578a45b7dc4f3f0f68feedc78ec7c347f91a0464bccd58aa2fc11016e88cbaddfb22112edad752792af12fa550be3e6f15d69a6a9d547ab5381b93c58c12753b8085d9e17ed1f2519cc5cb756e3777ea9f8e49a6141460f8f6ced8d12d13d950691479e1207ed35ab71554122beb215a0fb6b34b90784f4be6bd6fbf93daf9d3bc4640bc52a662e750ce361c12c1bfa2ca4e2c784cbf70c406587b2ebd69faa7a891aca63d600247ad7dde426c1ef4e3b22a072ff8eb69c1b1cb30c605112786546c48cf1c4821b5bc0d0bd44ba83b05656b6e19a3d1a76931d983dd39efcc64298e892858e847e99519c1fa25b1998839788c5852b94202d803639d69058604374f76769670a60269dbc0688cea2d9d8672212b93ca501fbf6f7dfefad058e4bd0e0da1cff41b2f408c980f29a49b03efa9e3edef091d7df7529b6b5e8f7d43d103681cd7c38d02a431b15d539e9a3cf44dc71621664e756ad6404ba185b5e20c82760c488fde4253fb52ab850484a082e7ca275f475012be9c8d16d6b4a2c9d863440d5e113d18bbf42f128462764a99ca90af4fde890aee138fe4cbb45658eacd9d38c8a1fb4499c043cc25af87e6a650f38149ab018cc49f50bbd085e2a0ba3eeecde5764f7997748a660593191977792d7176e4c2ff0113d67b9abe8fbc10f364c6fa68e52a455aa56ff15099c6efb6b5812972380d5b8e256b0feb1190835b7d076744c1b5b738c710a07a32676a15d96583e89e39eb4ff08cf02c6e2ad540c2b66299afe01bf2e50c81465a04d229a07c58ffd25a6cd9288110045526b376548d373273e6227d117d491020fd68e366ed697a0d30a5bdff25fa9a5800aa534a3669215dfa8f30960f142a8ae7ffcb654ca60aa7dc8a586670f9db37d05644ff5f934785c5433e605f3fbd0340e168511e209a0aedd8b18f3b948eb58051136d155f53b0e2e027361330e005f83f3a72dcc5d9161dd4b1e6abd16635dc0887dcc833a1fb59c10e0b8bea2536e7acd58d5e11179d13a24dc4292624c527266351b9a48893b956ffe545c8d2c1563805addef2a82134c9c686449d83471f22c1e14601895e854a5f854230e4fb4ed4f9a7ee22e83234be6c5bb19d200c16543468f186ae11cba84ae1aeda5136f7f5b380d02ddb9cbe2c5f5bb39138fa29b2ceb549d2e337eba10171fc237473351cf8e5989c193ef0100c75778ad0c05b64b614067c9a70680c818a566c4ba5e2991eedfe165199a55b0bef1333988f2add167e268db389c2d25bd85eedff9e6851e3df84c9e41128b5a76869c086fcf9275b1d51af02e4a92b66850785319dbf004a29594e32d12ca42da69fac69f886f963409ce1d4514d1ab9e915e071887e7f316b15014d083769afea374e0771f74f632db5ed7d7352546ed686e3ee161cd263dafc2acab74a67a5721f923f9b07c647c2a04f7d1c2f831d4319a60b16ed4c995e35ccbc291ff647a382976ba5a957547b0000
1 change: 1 addition & 0 deletions tests/data/1in3out_tx.hex

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tests/data/2in3out_exp.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0200000001027a2ac82252ab075b902a5515a60c21992b82839a835c3bdd14693df06d2875332c00000000fdffffff7a2ac82252ab075b902a5515a60c21992b82839a835c3bdd14693df06d2875330700000000fdffffff0301230f4f5d4b7c6fa845806ee4f67713459e1b69e8e60fcee2e4940c7a0d5de1b2010000000005f5dfba001600140dee90a6ee92e97eb19e30961c4c46927efa438101230f4f5d4b7c6fa845806ee4f67713459e1b69e8e60fcee2e4940c7a0d5de1b2010000000005f5e1000016001419abecb8f7968b453d635050bab49e0534f3f19c01230f4f5d4b7c6fa845806ee4f67713459e1b69e8e60fcee2e4940c7a0d5de1b2010000000000000146000066000000000002473044022052edc38055ef30c6693be717c52cca43348204c27fe1ba0ab64251852bfb4c2d0220785b5236ab203f6332f9f1b68d3f98b55b027e81aa5ef1c7c603140787286c060121031abe2442aa1cefbd14cfccadf68c711946f081e7a146b910761c1f8e61819e9b00000002473044022013e0990cc749151a79635eee180e54fa05cf4282a1360dfaf80b561dabd4f8fe0220164516da7d61c5f813046d5ea3951753db500610c9d00043510650fe7e5e60f80121020a0ed1cbf6cc48ed846996f450760cad708e3c36fe2fa0e878e2f0b3107e910c00000000000000
1 change: 1 addition & 0 deletions tests/data/2in3out_tx.hex

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tests/data/2in3out_tx2.hex

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tests/data/2in4out_tx.hex

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tests/data/2in5out_tx.hex

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tests/data/3in3out_tx.hex

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tests/data/4in3out_tx.hex

Large diffs are not rendered by default.

0 comments on commit 04dd353

Please sign in to comment.