Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mirror
ccan
Commits
7d1f0c73
Commit
7d1f0c73
authored
Sep 21, 2018
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypto/shachain/tools: update to new rbuf API.
Signed-off-by:
Rusty Russell
<
rusty@rustcorp.com.au
>
parent
8e6c2fec
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
ccan/crypto/shachain/tools/Makefile
ccan/crypto/shachain/tools/Makefile
+4
-1
ccan/crypto/shachain/tools/shachain48.c
ccan/crypto/shachain/tools/shachain48.c
+2
-2
No files found.
ccan/crypto/shachain/tools/Makefile
View file @
7d1f0c73
...
...
@@ -5,7 +5,7 @@ CFLAGS=-Wall -Werror -O3 -I$(CCANDIR) -DSHACHAIN_BITS=48
#CFLAGS=-Wall -Werror -g3 -I$(CCANDIR) -DSHACHAIN_BITS=48
# 48 bit index for shachain. This is what lightning uses.
CCAN_OBJS
:=
ccan-str.o ccan-err.o ccan-hex.o ccan-shachain.o ccan-sha256.o ccan-rbuf.o
CCAN_OBJS
:=
ccan-str.o ccan-err.o ccan-hex.o ccan-shachain.o ccan-sha256.o ccan-rbuf.o
ccan-membuf.o
all
:
shachain48
...
...
@@ -15,6 +15,7 @@ shachain48.o: $(CCANDIR)/ccan/crypto/shachain/shachain.h \
$(CCANDIR)/ccan/str/hex/hex.h
\
$(CCANDIR)/ccan/str/str.h
\
$(CCANDIR)/ccan/err/err.h
\
$(CCANDIR)/ccan/membuf/membuf.h
\
$(CCANDIR)/ccan/rbuf/rbuf.h
shachain48.o $(CCAN_OBJS)
:
$(CCANDIR)/config.h
...
...
@@ -37,3 +38,5 @@ ccan-sha256.o: $(CCANDIR)/ccan/crypto/sha256/sha256.c
$(CC)
$(CFLAGS)
-c
-o
$@
$<
ccan-rbuf.o
:
$(CCANDIR)/ccan/rbuf/rbuf.c
$(CC)
$(CFLAGS)
-c
-o
$@
$<
ccan-membuf.o
:
$(CCANDIR)/ccan/membuf/membuf.c
$(CC)
$(CFLAGS)
-c
-o
$@
$<
ccan/crypto/shachain/tools/shachain48.c
View file @
7d1f0c73
...
...
@@ -16,9 +16,9 @@ int main(int argc, char *argv[])
char
*
p
;
shachain_init
(
&
s
);
rbuf_init
(
&
rbuf
,
STDIN_FILENO
,
malloc
(
size
),
size
);
rbuf_init
(
&
rbuf
,
STDIN_FILENO
,
malloc
(
size
),
size
,
membuf_realloc
);
while
((
p
=
rbuf_read_str
(
&
rbuf
,
'\n'
,
realloc
))
!=
NULL
)
{
while
((
p
=
rbuf_read_str
(
&
rbuf
,
'\n'
))
!=
NULL
)
{
struct
sha256
hash
;
unsigned
long
long
idx
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment