Skip to content

Commit facc0b2

Browse files
revert changes
1 parent 02e8b15 commit facc0b2

File tree

3 files changed

+1
-66
lines changed

3 files changed

+1
-66
lines changed

build/ci.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ func buildFlags(env build.Environment, staticLinking bool, buildTags []string) (
251251
if runtime.GOOS == "linux" {
252252
// Enforce the stacksize to 8M, which is the case on most platforms apart from
253253
// alpine Linux.
254-
extld := []string{"-Wl,-z,stack-size=0x800000,--build-id=none,--strip-all"}
254+
extld := []string{"-Wl,-z,stack-size=0x800000"}
255255
if staticLinking {
256256
extld = append(extld, "-static")
257257
// Under static linking, use of certain glibc features must be

core/blockchain.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,6 @@ func (bc *BlockChain) loadLastState() error {
556556
if pivot := rawdb.ReadLastPivotNumber(bc.db); pivot != nil {
557557
log.Info("Loaded last snap-sync pivot marker", "number", *pivot)
558558
}
559-
560559
return nil
561560
}
562561

rpc/client_test.go

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -37,70 +37,6 @@ import (
3737
"github.com/ethereum/go-ethereum/log"
3838
)
3939

40-
// unsubscribeBlocker will wait for the quit channel to process an unsubscribe
41-
// request.
42-
type unsubscribeBlocker struct {
43-
ServerCodec
44-
quit chan struct{}
45-
}
46-
47-
func (b *unsubscribeBlocker) readBatch() ([]*jsonrpcMessage, bool, error) {
48-
msgs, batch, err := b.ServerCodec.readBatch()
49-
for _, msg := range msgs {
50-
if msg.isUnsubscribe() {
51-
<-b.quit
52-
}
53-
}
54-
return msgs, batch, err
55-
}
56-
57-
// TestUnsubscribeTimeout verifies that calling the client's Unsubscribe
58-
// function will eventually timeout and not block forever in case the serve does
59-
// not respond.
60-
// It reproducers the issue https://github.com/ethereum/go-ethereum/issues/30156
61-
func TestUnsubscribeTimeout(t *testing.T) {
62-
srv := NewServer()
63-
srv.RegisterName("nftest", new(notificationTestService))
64-
65-
// Setup middleware to block on unsubscribe.
66-
p1, p2 := net.Pipe()
67-
blocker := &unsubscribeBlocker{ServerCodec: NewCodec(p1), quit: make(chan struct{})}
68-
defer close(blocker.quit)
69-
70-
// Serve the middleware.
71-
go srv.ServeCodec(blocker, OptionMethodInvocation|OptionSubscriptions)
72-
defer srv.Stop()
73-
74-
// Create the client on the other end of the pipe.
75-
cfg := new(clientConfig)
76-
client, _ := newClient(context.Background(), cfg, func(context.Context) (ServerCodec, error) {
77-
return NewCodec(p2), nil
78-
})
79-
defer client.Close()
80-
81-
// Start subscription.
82-
sub, err := client.Subscribe(context.Background(), "nftest", make(chan int), "someSubscription", 1, 1)
83-
if err != nil {
84-
t.Fatalf("failed to subscribe: %v", err)
85-
}
86-
87-
// Now on a separate thread, attempt to unsubscribe. Since the middleware
88-
// won't return, the function will only return if it times out on the request.
89-
done := make(chan struct{})
90-
go func() {
91-
sub.Unsubscribe()
92-
done <- struct{}{}
93-
}()
94-
95-
// Wait for the timeout. If the expected time for the timeout elapses, the
96-
// test is considered failed.
97-
select {
98-
case <-done:
99-
case <-time.After(10*time.Second + 50*time.Millisecond):
100-
t.Fatalf("Unsubscribe did not return within %s", "10")
101-
}
102-
}
103-
10440
func TestClientRequest(t *testing.T) {
10541
server := newTestServer()
10642
defer server.Stop()

0 commit comments

Comments
 (0)