mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-05 21:53:12 +02:00
Merge pull request #7356 from ziggie1984/benchmarking-fundinglocked
Fix Benchmark Test (BenchmarkReadMessage/Funding_Locked) in the lnwire package
This commit is contained in:
4
Makefile
4
Makefile
@@ -196,6 +196,10 @@ unit-race:
|
|||||||
@$(call print, "Running unit race tests.")
|
@$(call print, "Running unit race tests.")
|
||||||
env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(UNIT_RACE)
|
env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(UNIT_RACE)
|
||||||
|
|
||||||
|
unit-bench: $(BTCD_BIN)
|
||||||
|
@$(call print, "Running benchmark tests.")
|
||||||
|
$(UNIT_BENCH)
|
||||||
|
|
||||||
# =============
|
# =============
|
||||||
# FLAKE HUNTING
|
# FLAKE HUNTING
|
||||||
# =============
|
# =============
|
||||||
|
@@ -18,6 +18,9 @@
|
|||||||
* [Ensure that both the byte and string form of a TXID is populated in the
|
* [Ensure that both the byte and string form of a TXID is populated in the
|
||||||
lnrpc.Outpoint message](https://github.com/lightningnetwork/lnd/pull/7624).
|
lnrpc.Outpoint message](https://github.com/lightningnetwork/lnd/pull/7624).
|
||||||
|
|
||||||
|
* [Fix Benchmark Test (BenchmarkReadMessage/Channel_Ready) in the lnwire
|
||||||
|
package](https://github.com/lightningnetwork/lnd/pull/7356)
|
||||||
|
|
||||||
## RPC
|
## RPC
|
||||||
|
|
||||||
* [SendOutputs](https://github.com/lightningnetwork/lnd/pull/7631) now adheres
|
* [SendOutputs](https://github.com/lightningnetwork/lnd/pull/7631) now adheres
|
||||||
@@ -49,3 +52,4 @@ unlock or create.
|
|||||||
* Erik Arvstedt
|
* Erik Arvstedt
|
||||||
* hieblmi
|
* hieblmi
|
||||||
* Jordi Montes
|
* Jordi Montes
|
||||||
|
* ziggie1984
|
||||||
|
@@ -452,8 +452,20 @@ func newMsgChannelReady(t testing.TB, r io.Reader) *lnwire.ChannelReady {
|
|||||||
|
|
||||||
pubKey := randPubKey(t)
|
pubKey := randPubKey(t)
|
||||||
|
|
||||||
msg := lnwire.NewChannelReady(lnwire.ChannelID(c), pubKey)
|
// When testing the ChannelReady msg type in the WriteMessage
|
||||||
msg.ExtraData = createExtraData(t, r)
|
// function we need to populate the alias here to test the encoding
|
||||||
|
// of the TLV stream.
|
||||||
|
aliasScid := lnwire.NewShortChanIDFromInt(rand.Uint64())
|
||||||
|
msg := &lnwire.ChannelReady{
|
||||||
|
ChanID: lnwire.ChannelID(c),
|
||||||
|
NextPerCommitmentPoint: pubKey,
|
||||||
|
AliasScid: &aliasScid,
|
||||||
|
ExtraData: make([]byte, 0),
|
||||||
|
}
|
||||||
|
|
||||||
|
// We do not include the TLV record (aliasScid) into the ExtraData
|
||||||
|
// because when the msg is encoded the ExtraData is overwritten
|
||||||
|
// with the current aliasScid value.
|
||||||
|
|
||||||
return msg
|
return msg
|
||||||
}
|
}
|
||||||
|
@@ -100,12 +100,16 @@ ifeq ($(UNIT_TARGETED), yes)
|
|||||||
UNIT := $(GOTEST) -tags="$(DEV_TAGS) $(LOG_TAGS)" $(TEST_FLAGS) $(UNITPKG)
|
UNIT := $(GOTEST) -tags="$(DEV_TAGS) $(LOG_TAGS)" $(TEST_FLAGS) $(UNITPKG)
|
||||||
UNIT_DEBUG := $(GOTEST) -v -tags="$(DEV_TAGS) $(LOG_TAGS)" $(TEST_FLAGS) $(UNITPKG)
|
UNIT_DEBUG := $(GOTEST) -v -tags="$(DEV_TAGS) $(LOG_TAGS)" $(TEST_FLAGS) $(UNITPKG)
|
||||||
UNIT_RACE := $(GOTEST) -tags="$(DEV_TAGS) $(LOG_TAGS) lowscrypt" $(TEST_FLAGS) -race $(UNITPKG)
|
UNIT_RACE := $(GOTEST) -tags="$(DEV_TAGS) $(LOG_TAGS) lowscrypt" $(TEST_FLAGS) -race $(UNITPKG)
|
||||||
|
# NONE is a special value which selects no other tests but only executes the benchmark tests here.
|
||||||
|
UNIT_BENCH := $(GOTEST) -tags="$(DEV_TAGS) $(LOG_TAGS)" -test.bench=. -test.run=NONE $(UNITPKG)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(UNIT_TARGETED), no)
|
ifeq ($(UNIT_TARGETED), no)
|
||||||
UNIT := $(GOLIST) | $(XARGS) env $(GOTEST) -tags="$(DEV_TAGS) $(LOG_TAGS)" $(TEST_FLAGS)
|
UNIT := $(GOLIST) | $(XARGS) env $(GOTEST) -tags="$(DEV_TAGS) $(LOG_TAGS)" $(TEST_FLAGS)
|
||||||
UNIT_DEBUG := $(GOLIST) | $(XARGS) env $(GOTEST) -v -tags="$(DEV_TAGS) $(LOG_TAGS)" $(TEST_FLAGS)
|
UNIT_DEBUG := $(GOLIST) | $(XARGS) env $(GOTEST) -v -tags="$(DEV_TAGS) $(LOG_TAGS)" $(TEST_FLAGS)
|
||||||
UNIT_RACE := $(UNIT) -race
|
UNIT_RACE := $(UNIT) -race
|
||||||
|
# NONE is a special value which selects no other tests but only executes the benchmark tests here.
|
||||||
|
UNIT_BENCH := $(GOLIST) | $(XARGS) env $(GOTEST) -tags="$(DEV_TAGS) $(LOG_TAGS)" -test.bench=. -test.run=NONE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user