mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00

* Use separate than finality depth for merge set calculations after HF * Add comments and edit error messages * Fix TestValidateTransactionInContextAndPopulateFee * Don't disconnect from node if isViolatingBoundedMergeDepth * Use new merge root for virtual pick parents; apply HF1 daa score split for validation only * Use `blue work` heuristic to skip irrelevant relay blocks * Minor * Make sure virtual's merge depth root is a real block * For ghostdag data we always use the non-trusted data * Fix TestBoundedMergeDepth and in IBD use VirtualMergeDepthRoot instead of MergeDepthRoot * Update HF1DAAScore * Make sure merge root and finality are called + avoid calculating virtual root twice * Update block version to 1 after HF * Update to v0.12.0 Co-authored-by: msutton <mikisiton2@gmail.com>
34 lines
848 B
Go
34 lines
848 B
Go
package integration
|
|
|
|
import (
|
|
"github.com/kaspanet/kaspad/infrastructure/network/addressmanager"
|
|
"testing"
|
|
)
|
|
|
|
func TestAddressExchange(t *testing.T) {
|
|
appHarness1, appHarness2, appHarness3, teardown := standardSetup(t)
|
|
defer teardown()
|
|
|
|
testAddress := "1.2.3.4:6789"
|
|
err := addressmanager.AddAddressByIP(appHarness1.app.AddressManager(), testAddress, nil)
|
|
if err != nil {
|
|
t.Fatalf("Error adding address to addressManager: %+v", err)
|
|
}
|
|
|
|
connect(t, appHarness1, appHarness2)
|
|
connect(t, appHarness2, appHarness3)
|
|
|
|
peerAddresses, err := appHarness3.rpcClient.GetPeerAddresses()
|
|
if err != nil {
|
|
t.Fatalf("Error getting peer addresses: %+v", err)
|
|
}
|
|
|
|
for _, peerAddress := range peerAddresses.Addresses {
|
|
if peerAddress.Addr == testAddress {
|
|
return
|
|
}
|
|
}
|
|
|
|
t.Errorf("Didn't find testAddress in list of addresses of appHarness3")
|
|
}
|