refactor: Fix indentation (#10740)

This commit is contained in:
Luke Schoen 2019-06-21 18:03:38 +10:00 committed by Andronik Ordian
parent 213e007a4b
commit 7701f73cdf
1 changed files with 54 additions and 54 deletions

View File

@ -125,13 +125,13 @@ mod tests {
#[test] #[test]
fn multi_transaction_deserialization() { fn multi_transaction_deserialization() {
let s = r#"{ let s = r#"{
"data" : [ "" ], "data": [ "" ],
"gasLimit" : [ "0x2dc6c0", "0x222222" ], "gasLimit": [ "0x2dc6c0", "0x222222" ],
"gasPrice" : "0x01", "gasPrice": "0x01",
"nonce" : "0x00", "nonce": "0x00",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", "secretKey": "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
"to" : "1000000000000000000000000000000000000000", "to": "1000000000000000000000000000000000000000",
"value" : [ "0x00", "0x01", "0x02" ] "value": [ "0x00", "0x01", "0x02" ]
}"#; }"#;
let _deserialized: MultiTransaction = serde_json::from_str(s).unwrap(); let _deserialized: MultiTransaction = serde_json::from_str(s).unwrap();
} }
@ -139,74 +139,74 @@ mod tests {
#[test] #[test]
fn state_deserialization() { fn state_deserialization() {
let s = r#"{ let s = r#"{
"env" : { "env": {
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentCoinbase": "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "0x0100", "currentDifficulty": "0x0100",
"currentGasLimit" : "0x01c9c380", "currentGasLimit": "0x01c9c380",
"currentNumber" : "0x00", "currentNumber": "0x00",
"currentTimestamp" : "0x01", "currentTimestamp": "0x01",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" "previousHash": "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}, },
"post" : { "post": {
"EIP150" : [ "EIP150": [
{ {
"hash" : "3e6dacc1575c6a8c76422255eca03529bbf4c0dda75dfc110b22d6dc4152396f", "hash": "3e6dacc1575c6a8c76422255eca03529bbf4c0dda75dfc110b22d6dc4152396f",
"indexes" : { "data" : 0, "gas" : 0, "value" : 0 } "indexes": { "data": 0, "gas": 0, "value": 0 }
}, },
{ {
"hash" : "99a450d8ce5b987a71346d8a0a1203711f770745c7ef326912e46761f14cd764", "hash": "99a450d8ce5b987a71346d8a0a1203711f770745c7ef326912e46761f14cd764",
"indexes" : { "data" : 0, "gas" : 0, "value" : 1 } "indexes": { "data": 0, "gas": 0, "value": 1 }
} }
], ],
"EIP158" : [ "EIP158": [
{ {
"hash" : "3e6dacc1575c6a8c76422255eca03529bbf4c0dda75dfc110b22d6dc4152396f", "hash": "3e6dacc1575c6a8c76422255eca03529bbf4c0dda75dfc110b22d6dc4152396f",
"indexes" : { "data" : 0, "gas" : 0, "value" : 0 } "indexes": { "data": 0, "gas": 0, "value": 0 }
}, },
{ {
"hash" : "99a450d8ce5b987a71346d8a0a1203711f770745c7ef326912e46761f14cd764", "hash": "99a450d8ce5b987a71346d8a0a1203711f770745c7ef326912e46761f14cd764",
"indexes" : { "data" : 0, "gas" : 0, "value" : 1 } "indexes": { "data": 0, "gas": 0, "value": 1 }
} }
] ]
}, },
"pre" : { "pre": {
"1000000000000000000000000000000000000000" : { "1000000000000000000000000000000000000000": {
"balance" : "0x0de0b6b3a7640000", "balance": "0x0de0b6b3a7640000",
"code" : "0x6040600060406000600173100000000000000000000000000000000000000162055730f1600055", "code": "0x6040600060406000600173100000000000000000000000000000000000000162055730f1600055",
"nonce" : "0x00", "nonce": "0x00",
"storage" : { "storage": {
} }
}, },
"1000000000000000000000000000000000000001" : { "1000000000000000000000000000000000000001": {
"balance" : "0x0de0b6b3a7640000", "balance": "0x0de0b6b3a7640000",
"code" : "0x604060006040600060027310000000000000000000000000000000000000026203d090f1600155", "code": "0x604060006040600060027310000000000000000000000000000000000000026203d090f1600155",
"nonce" : "0x00", "nonce": "0x00",
"storage" : { "storage": {
} }
}, },
"1000000000000000000000000000000000000002" : { "1000000000000000000000000000000000000002": {
"balance" : "0x00", "balance": "0x00",
"code" : "0x600160025533600455346007553060e6553260e8553660ec553860ee553a60f055", "code": "0x600160025533600455346007553060e6553260e8553660ec553860ee553a60f055",
"nonce" : "0x00", "nonce": "0x00",
"storage" : { "storage": {
} }
}, },
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
"balance" : "0x0de0b6b3a7640000", "balance": "0x0de0b6b3a7640000",
"code" : "0x", "code": "0x",
"nonce" : "0x00", "nonce": "0x00",
"storage" : { "storage": {
} }
} }
}, },
"transaction" : { "transaction": {
"data" : [ "" ], "data": [ "" ],
"gasLimit" : [ "285000", "100000", "6000" ], "gasLimit": [ "285000", "100000", "6000" ],
"gasPrice" : "0x01", "gasPrice": "0x01",
"nonce" : "0x00", "nonce": "0x00",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", "secretKey": "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "to": "095e7baea6a6c7c4c2dfeb977efac326af552d87",
"value" : [ "10", "0" ] "value": [ "10", "0" ]
} }
}"#; }"#;
let _deserialized: State = serde_json::from_str(s).unwrap(); let _deserialized: State = serde_json::from_str(s).unwrap();