Hello, This is just a matter of reversing the array, but the comment is a bit misleading ``` message open_anchor { // Transaction ID of anchor. required sha256_hash txid = 1; ``` See https://github.com/ElementsProject/lightning/blob/master/bitcoin/tx.c#L232 Cheers, Pierre
Activity
rustyrussell commentedon Jan 27, 2016
Pierre-Marie notifications@github.com writes:
We always encode hashes as big-endian. That's the normal encoding for SHA.
Unfortunately, bitcoind uses little-endian for transaction hashes for
reasons unknown. It uses big-endian for block hashes though!
It's wrong. I keep this script around to fix it up to paste into block:
( cat > hex_rev.c; chmod a+x hex_rev.c )
// 2>/dev/null; set -e; OUT=/tmp/
basename $0 .c; if [ ! -f "$OUT" ] || [ "$OUT" -ot "$0" ]; then gcc -Wall -g -o "$OUT".$$ $0 && mv "$OUT".$$ "$OUT"; fi; exec "$OUT" "$@"#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <err.h>
#include <stdbool.h>
static char hexchar(unsigned int x)
{
if (x < 10)
return '0' + x;
else
return 'a' - 10 + x;
}
static void print_hex(const unsigned char *val, size_t len)
{
size_t i;
}
static bool char_to_hex(unsigned char *val, char c)
{
if (c >= '0' && c <= '9') {
*val = c - '0';
return true;
}
if (c >= 'a' && c <= 'f') {
*val = c - 'a' + 10;
return true;
}
if (c >= 'A' && c <= 'F') {
*val = c - 'A' + 10;
return true;
}
return false;
}
static bool from_hex(const char *str, size_t slen, void *buf, size_t bufsize)
{
unsigned char v1, v2;
unsigned char *p = buf;
}
static void reverse_hash(unsigned char *hex, size_t len)
{
unsigned int i;
}
int main(int argc, char *argv[])
{
int i;
}
pm47 commentedon Feb 8, 2016
Fair enough!
Cheers
gossipd: handle overflowing query properly (avoid slow 100% CPU reports)
gossipd: handle overflowing query properly (avoid slow 100% CPU reports)
gossipd: handle overflowing query properly (avoid slow 100% CPU reports)
gossipd: handle overflowing query properly (avoid slow 100% CPU reports)
gossipd: handle overflowing query properly (avoid slow 100% CPU reports)
gossipd: handle overflowing query properly (avoid slow 100% CPU reports)
gossipd: handle overflowing query properly (avoid slow 100% CPU reports)
gossipd: handle overflowing query properly (avoid slow 100% CPU reports)
lightningd/chaintopology: free block map and watches on exit.
wallet/txfilter: free outpoint filter and scriptpubkeyset on exit.
lightningd/chaintopology: free block map and watches on exit.
wallet/txfilter: free outpoint filter and scriptpubkeyset on exit.
lightningd/chaintopology: free block map and watches on exit.
wallet/txfilter: free outpoint filter and scriptpubkeyset on exit.
lightningd/chaintopology: free block map and watches on exit.
wallet/txfilter: free outpoint filter and scriptpubkeyset on exit.
lightningd/chaintopology: free block map and watches on exit.
wallet/txfilter: free outpoint filter and scriptpubkeyset on exit.
lightningd/chaintopology: free block map and watches on exit.
wallet/txfilter: free outpoint filter and scriptpubkeyset on exit.
lightningd/chaintopology: free block map and watches on exit.
wallet/txfilter: free outpoint filter and scriptpubkeyset on exit.
Added NewChannel and ReadyChannel support. Added warmstart flag to Init.
fix: fixes `FATAL SIGNAL 11` on gossmap node
fix: fixes `FATAL SIGNAL 11` on gossmap node
fix: fixes `FATAL SIGNAL 11` on gossmap node
fix: fixes `FATAL SIGNAL 11` on gossmap node