mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
6389dbd455
This could be used by an always-on node to agressively shorten their timeouts. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
24 lines
926 B
C
24 lines
926 B
C
#ifndef LIGHTNING_PROTOBUF_CONVERT_H
|
|
#define LIGHTNING_PROTOBUF_CONVERT_H
|
|
#include <ccan/tal/tal.h>
|
|
#include <stdbool.h>
|
|
#include "lightning.pb-c.h"
|
|
|
|
/* Convert to-from protobuf to internal representation. */
|
|
struct signature;
|
|
Signature *signature_to_proto(const tal_t *ctx, const struct signature *sig);
|
|
bool proto_to_signature(const Signature *pb, struct signature *sig);
|
|
|
|
/* Convert to-from protobuf to internal representation. */
|
|
struct pubkey;
|
|
BitcoinPubkey *pubkey_to_proto(const tal_t *ctx, const struct pubkey *key);
|
|
bool proto_to_pubkey(const BitcoinPubkey *pb, struct pubkey *key);
|
|
|
|
/* Useful helper for allocating & populating a protobuf Sha256Hash */
|
|
struct sha256;
|
|
Sha256Hash *sha256_to_proto(const tal_t *ctx, const struct sha256 *hash);
|
|
void proto_to_sha256(const Sha256Hash *pb, struct sha256 *hash);
|
|
|
|
bool proto_to_locktime(const OpenChannel *o, uint32_t *locktime);
|
|
#endif /* LIGHTNING_PROTOBUF_CONVERT_H */
|