Skip to content

Commit

Permalink
fix formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sstone committed Jun 23, 2016
1 parent 07e6ed0 commit be1a230
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions daemon/packets.c
Original file line number Diff line number Diff line change
Expand Up @@ -818,8 +818,8 @@ Pkt *accept_pkt_revocation(struct peer *peer, const Pkt *pkt)

proto_to_sha256(r->revocation_preimage, ci->revocation_preimage);

// save revocation preimages in shachain
shachain_add_hash(&peer->their_preimages, 0xFFFFFFFFFFFFFFFFL - ci->commit_num, ci->revocation_preimage);
// save revocation preimages in shachain
shachain_add_hash(&peer->their_preimages, 0xFFFFFFFFFFFFFFFFL - ci->commit_num, ci->revocation_preimage);

/* Save next revocation hash. */
proto_to_sha256(r->next_revocation_hash,
Expand Down
4 changes: 2 additions & 2 deletions daemon/peer.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ struct peer {
/* Stuff we have in common. */
struct peer_visible_state local, remote;

/* this is where we will store their revocation preimages*/
struct shachain their_preimages;
/* this is where we will store their revocation preimages*/
struct shachain their_preimages;
};

void setup_listeners(struct lightningd_state *dstate, unsigned int portnum);
Expand Down
6 changes: 3 additions & 3 deletions daemon/secrets.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,14 @@ void peer_secrets_init(struct peer *peer)
sizeof(peer->secrets->revocation_seed.u.u8)) != 1)
fatal("Could not get random bytes for revocation seed");

shachain_init(&peer->their_preimages);
shachain_init(&peer->their_preimages);
}

void peer_get_revocation_preimage(const struct peer *peer, u64 index,
struct sha256 *preimage)
{
// generate hashes in reverse order, otherwise the first hash gives away everything
shachain_from_seed(&peer->secrets->revocation_seed, 0xFFFFFFFFFFFFFFFFL - index, preimage);
// generate hashes in reverse order, otherwise the first hash gives away everything
shachain_from_seed(&peer->secrets->revocation_seed, 0xFFFFFFFFFFFFFFFFL - index, preimage);
}

void peer_get_revocation_hash(const struct peer *peer, u64 index,
Expand Down

0 comments on commit be1a230

Please sign in to comment.