diff --git a/common/onion_message_parse.c b/common/onion_message_parse.c index ba0fc19aa..b7578f28a 100644 --- a/common/onion_message_parse.c +++ b/common/onion_message_parse.c @@ -109,7 +109,7 @@ bool onion_message_parse(const tal_t *ctx, /* Now get onion shared secret and parse it. */ ecdh(&ephemeral, &onion_ss); - rs = process_onionpacket(tmpctx, op, &onion_ss, NULL, 0, false); + rs = process_onionpacket(tmpctx, op, &onion_ss, NULL, 0); if (!rs) { status_peer_debug(peer, "onion_message_parse: can't process onionpacket ss=%s", diff --git a/common/sphinx.c b/common/sphinx.c index 815e85d34..7d728bfe6 100644 --- a/common/sphinx.c +++ b/common/sphinx.c @@ -627,8 +627,7 @@ struct route_step *process_onionpacket( const struct onionpacket *msg, const struct secret *shared_secret, const u8 *assocdata, - const size_t assocdatalen, - bool has_realm + const size_t assocdatalen ) { struct route_step *step = talz(ctx, struct route_step); diff --git a/common/sphinx.h b/common/sphinx.h index da90e7558..6a1dbbcb0 100644 --- a/common/sphinx.h +++ b/common/sphinx.h @@ -107,16 +107,13 @@ bool onion_shared_secret( * @hoppayload: the per-hop payload destined for the processing node. * @assocdata: associated data to commit to in HMACs * @assocdatalen: length of the assocdata - * @has_realm: used for HTLCs, where first byte 0 is magical. */ struct route_step *process_onionpacket( const tal_t * ctx, const struct onionpacket *packet, const struct secret *shared_secret, const u8 *assocdata, - const size_t assocdatalen, - bool has_realm - ); + const size_t assocdatalen); /** * serialize_onionpacket - Serialize an onionpacket to a buffer. diff --git a/common/test/run-blindedpath_onion.c b/common/test/run-blindedpath_onion.c index d03706150..084e1a27e 100644 --- a/common/test/run-blindedpath_onion.c +++ b/common/test/run-blindedpath_onion.c @@ -140,7 +140,7 @@ static u8 *next_onion(const tal_t *ctx, u8 *omsg, assert(unblind_onion(&blinding, ecdh, &ephemeral, &ss)); ecdh(&ephemeral, &onion_ss); - rs = process_onionpacket(tmpctx, op, &onion_ss, NULL, 0, false); + rs = process_onionpacket(tmpctx, op, &onion_ss, NULL, 0); assert(rs); /* The raw payload is prepended with length in the modern onion. */ diff --git a/common/test/run-onion-test-vector.c b/common/test/run-onion-test-vector.c index b68f63fe2..897b7bba3 100644 --- a/common/test/run-onion-test-vector.c +++ b/common/test/run-onion-test-vector.c @@ -193,7 +193,7 @@ int main(int argc, char *argv[]) json_to_secret(json, t, &mykey); test_ecdh(&op->ephemeralkey, &ss); - rs = process_onionpacket(tmpctx, op, &ss, assoc_data, tal_bytelen(assoc_data), true); + rs = process_onionpacket(tmpctx, op, &ss, assoc_data, tal_bytelen(assoc_data)); assert(tal_arr_eq(rs->raw_payload, payloads[i])); if (rs->nextcase == ONION_FORWARD) op = rs->next; diff --git a/devtools/onion.c b/devtools/onion.c index 18430ce7c..54ef3d6e1 100644 --- a/devtools/onion.c +++ b/devtools/onion.c @@ -125,7 +125,7 @@ static struct route_step *decode_with_privkey(const tal_t *ctx, const u8 *onion, errx(1, "Error creating shared secret."); step = process_onionpacket(ctx, packet, &shared_secret, assocdata, - tal_bytelen(assocdata), true); + tal_bytelen(assocdata)); return step; } diff --git a/lightningd/peer_htlcs.c b/lightningd/peer_htlcs.c index 10b73d61f..195390362 100644 --- a/lightningd/peer_htlcs.c +++ b/lightningd/peer_htlcs.c @@ -1337,7 +1337,7 @@ static bool peer_accepted_htlc(const tal_t *ctx, rs = process_onionpacket(tmpctx, op, hin->shared_secret, hin->payment_hash.u.u8, - sizeof(hin->payment_hash), true); + sizeof(hin->payment_hash)); if (!rs) { *badonion = WIRE_INVALID_ONION_HMAC; log_debug(channel->log, diff --git a/wallet/test/run-wallet.c b/wallet/test/run-wallet.c index fc759c708..4f27c95dc 100644 --- a/wallet/test/run-wallet.c +++ b/wallet/test/run-wallet.c @@ -915,9 +915,7 @@ struct route_step *process_onionpacket( const struct onionpacket *packet UNNEEDED, const struct secret *shared_secret UNNEEDED, const u8 *assocdata UNNEEDED, - const size_t assocdatalen UNNEEDED, - bool has_realm - ) + const size_t assocdatalen UNNEEDED) { fprintf(stderr, "process_onionpacket called!\n"); abort(); } /* Generated stub for psbt_fixup */ const u8 *psbt_fixup(const tal_t *ctx UNNEEDED, const u8 *psbtblob UNNEEDED)