Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rustyrussell/pettycoin
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a52c77b946e5
Choose a base ref
...
head repository: rustyrussell/pettycoin
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8d6718657519
Choose a head ref
  • 2 commits
  • 20 files changed
  • 1 contributor

Commits on Aug 7, 2014

  1. test: fix compiler warnings.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Aug 7, 2014
    Copy the full SHA
    fb97cdd View commit details
  2. configure: frob variables properly, use Makefile.in.

    Basically a rewrite of our build system, so it's not recursive.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Aug 7, 2014
    Copy the full SHA
    8d67186 View commit details
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -10,12 +10,11 @@ pettycoin-tx
dumbwallet
pettycoin-gateway
TAGS
inject
mkpriv
sizes
ecode_names.c
genesis.c
pkt_names.c
TODO
petty-addr
ccan/tools/configurator/configurator
Makefile
30 changes: 23 additions & 7 deletions Makefile → Makefile.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# Common targets:
# all: build all the binaries
# check: run all the checks.
#
# For developers:
# unit-check: run the unit tests
# blackbox-check: run the blackbox tests
# update-mocks: regenerate the mocks for the unit tests.

PETTYCOIN_OBJS := block.o check_block.o check_tx.o difficulty.o shadouble.o timestamp.o gateways.o hash_tx.o pettycoin.o merkle_txs.o merkle_recurse.o tx_cmp.o genesis.o marshal.o hash_block.o prev_txhashes.o state.o tal_packet.o dns.o netaddr.o peer.o peer_cache.o pseudorand.o welcome.o log.o generating.o blockfile.o pending.o log_helper.o txhash.o signature.o proof.o chain.o features.o todo.o base58.o sync.o create_refs.o shard.o packet_io.o tx.o complain.o block_shard.o recv_block.o input_refs.o peer_wants.o inputhash.o tx_in_hashes.o merkle_hashes.o recv_tx.o reward.o recv_complain.o json.o jsonrpc.o getinfo.o ecode_names.o sendrawtransaction.c pettycoin_dir.o pkt_names.o hex.o listtransactions.o
PETTYCOIN_GENERATE_OBJS := pettycoin-generate.o merkle_hashes.o merkle_recurse.o hash_tx.o tx_cmp.o shadouble.o marshal.o minimal_log.o timestamp.o tal_packet.o hex.o
MKGENESIS_OBJS := mkgenesis.o shadouble.o hash_block.o merkle_hashes.o merkle_recurse.o minimal_log.o
@@ -10,11 +19,12 @@ PETTYCOIN_GATEWAY_OBJS := pettycoin-gateway.o hex.o json.o pettycoin_dir.o base5
DUMBWALLET_OBJS := dumbwallet.o hex.o json.o pettycoin_dir.o base58.o create_tx.o marshal.o signature.o minimal_log.o shadouble.o

BINS := pettycoin-generate mkgenesis pettycoin sizes mkpriv pettycoin-tx pettycoin-query petty-addr pettycoin-gateway dumbwallet
CCAN_OBJS := ccan-asort.o ccan-breakpoint.o ccan-tal.o ccan-tal-path.o ccan-tal-str.o ccan-take.o ccan-list.o ccan-str.o ccan-opt-helpers.o ccan-opt.o ccan-opt-parse.o ccan-opt-usage.o ccan-read_write_all.o ccan-htable.o ccan-io-io.o ccan-io-poll.o ccan-timer.o ccan-time.o ccan-noerr.o ccan-hash.o ccan-isaac64.o ccan-net.o ccan-err.o ccan-tal-grab_file.o
CCAN_OBJS := ccan-asort.o ccan-breakpoint.o ccan-tal.o ccan-tal-path.o ccan-tal-str.o ccan-take.o ccan-list.o ccan-str.o ccan-opt-helpers.o ccan-opt.o ccan-opt-parse.o ccan-opt-usage.o ccan-read_write_all.o ccan-htable.o ccan-io-io.o ccan-io-poll.o ccan-timer.o ccan-time.o ccan-noerr.o ccan-hash.o ccan-isaac64.o ccan-net.o ccan-err.o ccan-tal-grab_file.o ccan-strmap.o
CCANDIR=ccan/
VERSION:=$(shell git describe --dirty --always 2>/dev/null || echo Unknown)
#CFLAGS = -O3 -flto -ggdb -I $(CCANDIR) -Wall -DVERSION=\"$(VERSION)\"
CFLAGS = -ggdb -I $(CCANDIR) -Wall -Wmissing-prototypes -DVERSION=\"$(VERSION)\"
CFLAGS = @CFLAGS@ -I$(CCANDIR) -DVERSION=\"$(VERSION)\"
CC = @CC@
VALGRIND= @VALGRIND@
LDFLAGS = -O3 -flto
LDLIBS := -lcrypto -lrt
GENERATE_CFLAGS=-O3
@@ -28,6 +38,9 @@ all: $(BINS)

$(PETTYCOIN_OBJS) $(PETTYCOIN_GENERATE_OBJS) $(MKGENESIS_OBJS) $(SIZES_OBJS) $(MKPRIV_OBJS) $(PETTYCOIN_TX_OBJS) $(PETTYCOIN_QUERY_OBJS) $(PETTY_ADDR_OBJS) $(PETTYCOIN_GATEWAY_OBJS) $(DUMBWALLET_OBJS) $(CCAN_OBJS): ccan/config.h

Makefile: Makefile.in
./configure

ccan/config.h: configure
./configure

@@ -65,7 +78,6 @@ genesis.c: mkgenesis

.PHONY: test
check test: check-include-order
$(MAKE) -C test check

ecode_names.c: protocol_ecode.h Makefile
(echo '#include "ecode_names.h"'; echo 'struct ecode_names ecode_names[] = {'; sed -n 's/^\t\(PROTOCOL_ECODE_[A-Z_]*\)/\t{ \1, "\1" }/p' < $<; echo ' { 0, NULL } };') > $@
@@ -80,13 +92,12 @@ check-include-order:

clean:
$(RM) $(BINS) *.o
$(MAKE) -C test clean

TAGS:
etags *.[ch]

distclean: clean
$(RM) genesis.c ecode_names.c ccan/config.h
$(RM) genesis.c ecode_names.c ccan/config.h Makefile ccan/tools/configurator/configurator

ccan-asort.o: $(CCANDIR)/ccan/asort/asort.c
$(CC) $(CFLAGS) -c -o $@ $<
@@ -136,5 +147,10 @@ ccan-net.o: $(CCANDIR)/ccan/net/net.c
$(CC) $(CFLAGS) -c -o $@ $<
ccan-err.o: $(CCANDIR)/ccan/err/err.c
$(CC) $(CFLAGS) -c -o $@ $<
ccan-strmap.o: $(CCANDIR)/ccan/strmap/strmap.c
$(CC) $(CFLAGS) -c -o $@ $<

include tools/Makefile
include test/Makefile

-include *.d
.PHONY: tools test
26 changes: 20 additions & 6 deletions configure
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ find_command()
# Return if already set.
if [ -n "$(eval echo \$$WHAT)" ]; then
eval echo "\$$WHAT"
return 0;
return 0
fi
for arg; do
if type "$arg" > /dev/null; then
@@ -19,8 +19,8 @@ find_command()
fi
done
echo "Could not find \$WHAT, tried $@" >&2
exit 1
}
return 1
}

# Set defaults
for arg; do
@@ -38,15 +38,29 @@ for arg; do
esac
done

CC=$(find_command CC gcc cc)
if [ -z "$CFLAGS" ]; then
CFLAGS="-g3 -ggdb -Wall -Wundef -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wold-style-definition"
CC=$(find_command CC gcc cc) || exit 1
CFLAGS=${CFLAGS:-"-g3 -ggdb -Wall -Wundef -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wold-style-definition -fstack-protector"}
if VALGRIND="$(find_command VALGRIND valgrind) -q --error-exitcode=99"; then
VALGRIND_TEST_ARGS="--track-origins=yes --leak-check=full --show-reachable=yes --suppressions=vg-suppressions"
else
VALGRIND=""
VALGRIND_TEST_ARGS=""
fi

echo CC is "$CC"
echo CFLAGS is "$CFLAGS"
echo VALGRIND is "$VALGRIND"
echo VALGRIND_TEST_ARGS is "$VALGRIND_TEST_ARGS"

echo Building ccan/configurator...
$CC $CFLAGS -o ccan/tools/configurator/configurator ccan/tools/configurator/configurator.c
echo Generating config.h...
ccan/tools/configurator/configurator "$CC" $CFLAGS > ccan/config.h

for f in $(find * -name Makefile.in); do
MAKEFILE=$(echo "$f" | sed 's/.in$//')
echo Generating $MAKEFILE
sed -e "s,@CC@,$CC,g" -e "s,@CFLAGS@,$CFLAGS,g" -e "s,@VALGRIND@,$VALGRIND,g" -e "s,@VALGRIND_TEST_ARGS@,$VALGRIND_TEST_ARGS,g" < $f > $MAKEFILE
done

echo Configuration complete.
114 changes: 43 additions & 71 deletions test/Makefile
Original file line number Diff line number Diff line change
@@ -1,84 +1,56 @@
SOURCES := $(wildcard run-*.c)
HELPERS := $(wildcard helper*.c)
BINS := $(SOURCES:.c=)
CCANDIR := ../ccan/
BASECFLAGS := -ggdb -I $(CCANDIR) -Wall -DFASTCHECK
CFLAGS := -MMD $(BASECFLAGS)
TEST_SOURCES := $(wildcard test/run-*.c)
TEST_HELPERS := $(wildcard test/helper*.c)
TEST_BINS := $(TEST_SOURCES:.c=)
LDLIBS := -lcrypto -lrt
CCAN_OBJS := ccan-noerr.o ccan-tal.o ccan-take.o ccan-list.o ccan-read_write_all.o ccan-htable.o ccan-isaac64.o ccan-tal-str.o ccan-str.o ccan-time.o ccan-strmap.o ccan-hash.o ccan-io-io.o ccan-io-poll.o ccan-timer.o
HELPER_OBJS := $(HELPERS:.c=.o)
TEST_HELPER_OBJS := $(TEST_HELPERS:.c=.o)

VALGRIND=valgrind -q --error-exitcode=99 --track-origins=yes --leak-check=full --show-reachable=yes --suppressions=vg-suppressions
UNIT_TESTS:=$(TEST_BINS:%=check-%)

check: unit-check blackbox-check
default-test:
@echo Run make check from top dir. >&2 && exit 1

unit-check: $(BINS)
set -e; for b in $(BINS); do printf "[TEST] %-48s" $$b ; $(VALGRIND) ./$$b; echo OK ; done
check: unit-check

blackbox-check:
make -C blackbox check
unit-check: $(UNIT_TESTS)

bins: $(BINS)
$(UNIT_TESTS): check-test/%: test/%
@trap "rm -f unit.$*.out" EXIT; if $(VALGRIND) $(VALGRIND_TEST_ARGS) $< > unit.$*.out 2>&1; then printf "[UNIT] %-48s OK\n" $*; exit 0; else printf "[UNIT] %-48s FAIL\n" $*; cat unit.$*.out; exit 1; fi

update-mocks-%: %
test-bins: $(TEST_BINS)

update-mocks-test/%: test/%
@set -e; trap "rm -f mocktmp.$*.*" EXIT; \
START=`fgrep -n '/* AUTOGENERATED MOCKS START */' $* | cut -d: -f1`;\
END=`fgrep -n '/* AUTOGENERATED MOCKS END */' $* | cut -d: -f1`; \
START=`fgrep -n '/* AUTOGENERATED MOCKS START */' $< | cut -d: -f1`;\
END=`fgrep -n '/* AUTOGENERATED MOCKS END */' $< | cut -d: -f1`; \
if [ -n "$$START" ]; then \
echo $*: ; \
head -n $$START $* > mocktmp.$*.new; \
(cat mocktmp.$*.new; tail -n +$$END $*) > mocktmp.$*.test.c; \
if ! $(CC) $(BASECFLAGS) mocktmp.$*.test.c -o mocktmp.$*.out $(HELPER_OBJS) $(CCAN_OBJS) $(LDLIBS) 2>mocktmp.$*.err; then \
./mockup.sh < mocktmp.$*.err >> mocktmp.$*.new; \
echo $<: ; \
head -n $$START $< > mocktmp.$*.new; \
(cat mocktmp.$*.new; tail -n +$$END $<) > mocktmp.$*.test.c; \
if ! $(CC) $(CFLAGS) -Itest/ mocktmp.$*.test.c -o mocktmp.$*.out $(HELPER_OBJS) $(CCAN_OBJS) $(LDLIBS) 2>mocktmp.$*.err; then \
test/mockup.sh < mocktmp.$*.err >> mocktmp.$*.new; \
sed -n 's,.*Generated stub for \(.*\) .*,\t\1,p' < mocktmp.$*.new; \
fi; \
tail -n +$$END $* >> mocktmp.$*.new; mv mocktmp.$*.new $*; \
tail -n +$$END $< >> mocktmp.$*.new; mv mocktmp.$*.new $<; \
fi

$(SOURCES:%=update-mocks-%): $(CCAN_OBJS) $(HELPER_OBJS)

update-mocks: $(SOURCES:%=update-mocks-%)

$(BINS:=.o) : %.o : %.c
$(CC) $(CFLAGS) -c -o $@ $<

$(BINS) : $(HELPER_OBJS) $(CCAN_OBJS)

ccan-noerr.o: $(CCANDIR)/ccan/noerr/noerr.c
$(CC) $(CFLAGS) -c -o $@ $<
ccan-tal.o: $(CCANDIR)/ccan/tal/tal.c
$(CC) $(CFLAGS) -c -o $@ $<
ccan-take.o: $(CCANDIR)/ccan/take/take.c
$(CC) $(CFLAGS) -c -o $@ $<
ccan-list.o: $(CCANDIR)/ccan/list/list.c
$(CC) $(CFLAGS) -c -o $@ $<
ccan-read_write_all.o: $(CCANDIR)/ccan/read_write_all/read_write_all.c
$(CC) $(CFLAGS) -c -o $@ $<
ccan-hash.o: $(CCANDIR)/ccan/hash/hash.c
$(CC) $(CFLAGS) -c -o $@ $<
ccan-htable.o: $(CCANDIR)/ccan/htable/htable.c
$(CC) $(CFLAGS) -c -o $@ $<
ccan-str.o: $(CCANDIR)/ccan/str/str.c
$(CC) $(CFLAGS) -c -o $@ $<
ccan-tal-str.o: $(CCANDIR)/ccan/tal/str/str.c
$(CC) $(CFLAGS) -c -o $@ $<
ccan-isaac64.o: $(CCANDIR)/ccan/isaac/isaac64.c
$(CC) $(CFLAGS) -c -o $@ $<
ccan-time.o: $(CCANDIR)/ccan/time/time.c
$(CC) $(CFLAGS) -c -o $@ $<
ccan-strmap.o: $(CCANDIR)/ccan/strmap/strmap.c
$(CC) $(CFLAGS) -c -o $@ $<
ccan-io-io.o: $(CCANDIR)/ccan/io/io.c
$(CC) $(CFLAGS) -c -o $@ $<
ccan-io-poll.o: $(CCANDIR)/ccan/io/poll.c
$(CC) $(CFLAGS) -c -o $@ $<
ccan-timer.o: $(CCANDIR)/ccan/timer/timer.c
$(CC) $(CFLAGS) -c -o $@ $<

clean:
rm -f $(BINS) *.o *.d

.PHONY:
bins

-include *.d
$(TEST_SOURCES:%=update-mocks-%): $(CCAN_OBJS) $(TEST_HELPER_OBJS)

update-mocks: $(TEST_SOURCES:%=update-mocks-%)

$(TEST_BINS:=.o) : %.o : %.c
@$(CC) $(CFLAGS) -Itest/ -c -o $@ $<

$(TEST_BINS) : $(TEST_HELPER_OBJS) $(CCAN_OBJS)

clean: test-clean
distclean: test-distclean

test-clean:
rm -f $(TEST_BINS) test/*.o

test-distclean:

include test/standalone/Makefile
include test/blackbox/Makefile

.PHONY: update-mocks
25 changes: 19 additions & 6 deletions test/blackbox/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
ALL:=$(wildcard test-*.sh)
TESTS:=$(ALL:%=check-%)
BLACKBOX_ALL:=$(wildcard test/blackbox/test-*.sh)
BLACKBOX_TESTS:=$(BLACKBOX_ALL:%=check-%)

check: $(TESTS)
check: blackbox-check

blackbox-check: $(BLACKBOX_TESTS)

$(BLACKBOX_ALL): $(BINS)

$(BLACKBOX_TESTS): check-test/blackbox/%: test/blackbox/%
@$(RM) -r $<-dir && mkdir $<-dir
@ulimit -c unlimited; if SCRATCHDIR="$<-dir" RUNPREFIX="./" $< > $<-dir/output 2>&1; then printf "[BLACKBOX] %-44s OK\n" $*; exit 0; else printf "[BLACKBOX] %-44s FAIL\n" $*; cat $<-dir/output; exit 1; fi

test-clean: test-blackbox-clean
test-distclean: test-blackbox-distclean

test-blackbox-clean:
$(RM) -r $(BLACKBOX_TESTS:%=%-dir)

test-blackbox-distclean:

check-%:
$(RM) -r $*-dir
ulimit -c unlimited && mkdir $*-dir && ./$* $*-dir
32 changes: 16 additions & 16 deletions test/blackbox/test-01-sync.sh
Original file line number Diff line number Diff line change
@@ -2,47 +2,47 @@

set -em

mkdir $1/p1 $1/p2
mkdir $SCRATCHDIR/p1 $SCRATCHDIR/p2

NEWBLOCK=100100000800000000000000010002dcf2b3ff756f4c39c16a417e69138d79ce03488dda58e4f53cf640b3a99b91de4e8561afa441badda92600000028000000521f00001201212a5b494784a924f2e0249bf4c268af1d0e000000006d07571dee2e35e1378bc43a8e1388d2fef6b3021cc9924b885d53b2ce390ea86d07571dee2e35e1378bc43a8e1388d2fef6b3021cc9924b885d53b2ce390ea86d07571dee2e35e1378bc43a8e1388d2fef6b3021cc9924b885d53b2ce390ea86d07571dee2e35e1378bc43a8e1388d2fef6b3021cc9924b885d53b2ce390ea83e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e449ee153c4ff3b1d7a7f0901

# Unpack their blockfiles.
xzcat test-01-blockfile1.xz > $1/p1/blockfile
xzcat test-01-blockfile2.xz > $1/p2/blockfile
xzcat test/blackbox/test-01-blockfile1.xz > $SCRATCHDIR/p1/blockfile
xzcat test/blackbox/test-01-blockfile2.xz > $SCRATCHDIR/p2/blockfile

# Make sure they find each other.
touch $1/addresses
ln -sf ../addresses $1/p1/addresses
ln -sf ../addresses $1/p2/addresses
touch $SCRATCHDIR/addresses
ln -sf ../addresses $SCRATCHDIR/p1/addresses
ln -sf ../addresses $SCRATCHDIR/p2/addresses

../../pettycoin --seeding --developer-test --pettycoin-dir=$1/p1 > $1/p1.log 2>&1 &
../../pettycoin --seeding --developer-test --pettycoin-dir=$1/p2 > $1/p2.log 2>&1 &
$RUNPREFIX/pettycoin --seeding --developer-test --pettycoin-dir=$SCRATCHDIR/p1 > $SCRATCHDIR/p1.log 2>&1 &
$RUNPREFIX/pettycoin --seeding --developer-test --pettycoin-dir=$SCRATCHDIR/p2 > $SCRATCHDIR/p2.log 2>&1 &

# They should complete within 1 minute.
END=$(( $(date +%s) + 60 ))

# Wait for startup
while [ $(date +%s) -lt $END ]; do
if ../../pettycoin-query --pettycoin-dir=$1/p1 help >/dev/null 2>&1 && ../../pettycoin-query --pettycoin-dir=$1/p2 help >/dev/null 2>&1; then
if $RUNPREFIX/pettycoin-query --pettycoin-dir=$SCRATCHDIR/p1 help >/dev/null 2>&1 && $RUNPREFIX/pettycoin-query --pettycoin-dir=$SCRATCHDIR/p2 help >/dev/null 2>&1; then
break;
fi
sleep 5
done

# Give P1 new block, will trigger P2 to ask.
../../pettycoin-query --pettycoin-dir=$1/p1 submitblock $NEWBLOCK
$RUNPREFIX/pettycoin-query --pettycoin-dir=$SCRATCHDIR/p1 submitblock $NEWBLOCK

while [ $(date +%s) -lt $END ]; do
DEPTH1=`../../pettycoin-query --pettycoin-dir=$1/p1 getinfo | sed -n 's/.*"height" : \([0-9]\+\) .*num_todos.*/\1/p'`
DEPTH2=`../../pettycoin-query --pettycoin-dir=$1/p2 getinfo | sed -n 's/.*"height" : \([0-9]\+\) .*num_todos.*/\1/p'`
DEPTH1=`$RUNPREFIX/pettycoin-query --pettycoin-dir=$SCRATCHDIR/p1 getinfo | sed -n 's/.*"height" : \([0-9]\+\) .*num_todos.*/\1/p'`
DEPTH2=`$RUNPREFIX/pettycoin-query --pettycoin-dir=$SCRATCHDIR/p2 getinfo | sed -n 's/.*"height" : \([0-9]\+\) .*num_todos.*/\1/p'`
if [ "$DEPTH1" = "$DEPTH2" ]; then
../../pettycoin-query --pettycoin-dir=$1/p1 stop
../../pettycoin-query --pettycoin-dir=$1/p2 stop
$RUNPREFIX/pettycoin-query --pettycoin-dir=$SCRATCHDIR/p1 stop
$RUNPREFIX/pettycoin-query --pettycoin-dir=$SCRATCHDIR/p2 stop
exit 0
fi
sleep 5
done
echo Timeout >&2
../../pettycoin-query --pettycoin-dir=$1/p1 stop
../../pettycoin-query --pettycoin-dir=$1/p2 stop
$RUNPREFIX/pettycoin-query --pettycoin-dir=$SCRATCHDIR/p1 stop
$RUNPREFIX/pettycoin-query --pettycoin-dir=$SCRATCHDIR/p2 stop
exit 1
2 changes: 1 addition & 1 deletion test/blackbox/test-issue-20-dumbwallet-import.sh
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

set -e

OUT=`../../dumbwallet --pettycoin-dir=$1 setup P-cNkMqSEm5FsNGTPcKUaUjoVA8adAm9tezdAjsAeGfxtxjhps76M8`
OUT=`$RUNPREFIX/dumbwallet --pettycoin-dir=$SCRATCHDIR setup P-cNkMqSEm5FsNGTPcKUaUjoVA8adAm9tezdAjsAeGfxtxjhps76M8`
# Should give correct address.
echo "$OUT" | grep P-mxEP2midj7DRBW4yCxBBSs2MWcMsQfqQVw > /dev/null

4 changes: 2 additions & 2 deletions test/mockup.sh
Original file line number Diff line number Diff line change
@@ -15,11 +15,11 @@ if [ $# -eq 0 ]; then
fi

for SYMBOL; do
WHERE=$(grep -nH "^[a-z0-9_ ]* [*]*$SYMBOL(" ../*.h)
WHERE=$(grep -nH "^[a-z0-9_ ]* [*]*$SYMBOL(" *.h)
if [ x"$WHERE" != x ]; then
STUB='\n{ fprintf(stderr, "'$SYMBOL' called!\\n"); abort(); }'
else
WHERE=$(grep -nH "^extern \(const \)\?struct [a-zA-Z0-9_]* $SYMBOL;$" ../*.h)
WHERE=$(grep -nH "^extern \(const \)\?struct [a-zA-Z0-9_]* $SYMBOL;$" *.h)
if [ x"$WHERE" != x ]; then
STUB=';'
else
6 changes: 6 additions & 0 deletions test/run-01-create_gateway_transaction.c
Original file line number Diff line number Diff line change
@@ -23,6 +23,12 @@
union protocol_tx *block_get_tx(const struct block *block, u16 shardnum,
u8 txoff)
{ fprintf(stderr, "block_get_tx called!\n"); abort(); }
/* Could not find declaration for helper_addr */
/* Could not find declaration for helper_gateway_addr */
/* Could not find declaration for helper_gateway_key */
/* Could not find declaration for helper_gateway_public_key */
/* Could not find declaration for helper_private_key */
/* Could not find declaration for helper_public_key */
/* Generated stub for reward_amount */
u32 reward_amount(const struct block *reward_block,
const union protocol_tx *tx)
Loading