Skip to content

Commit

Permalink
Merge pull request #4 from gskapka/fix-rlp-bug
Browse files Browse the repository at this point in the history
fix(bugs): rlp-status bug and missing err msg in node-cxn test
  • Loading branch information
gskapka authored Nov 6, 2019
2 parents 9bda1ca + e5bd0c7 commit c39a0ad
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ __`❍ cargo +nightly test`__

__Note:__ Some expensive tests are ignored by default. To run all test, including those ignored, add the __`--ignored`__ flag.

__:radioactive: CAUTION:__ Some tests rely on access to a full node at __`http://localhost:8545`__. If one can't be reached at that endpoint, many of the tests will fail.
__:radioactive: CAUTION:__ Some tests rely on access to a full __MAINNET__ node existing at __`http://localhost:8545`__. If one can't be reached at that endpoint, many of the tests will fail.

 

Expand Down
2 changes: 1 addition & 1 deletion src/connect_to_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ mod tests {
match connect_to_node(state) {
Ok(returned_state) =>
assert!(returned_state.tx_hash == expected_tx_hash),
Err(_) => panic!("Should connect to node w/ working endpoint!")
Err(e) => panic!("Error connecting to node: {}", e)
}
}

Expand Down
9 changes: 6 additions & 3 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,12 @@ pub struct Receipt {

impl Encodable for Receipt {
fn rlp_append(&self, rlp_stream: &mut RlpStream) {
rlp_stream
.begin_list(4)
.append(&self.status)
let rlp = rlp_stream.begin_list(4);
match &self.status {
true => rlp.append(&self.status),
false => rlp.append_empty_data()
};
rlp
.append(&self.cumulative_gas_used)
.append(&self.logs_bloom)
.append_list(&self.logs);
Expand Down

0 comments on commit c39a0ad

Please sign in to comment.