Add share cards
This commit is contained in:
51 files changed
+1193
-239
No files matched your search
@@ -140,7 +140,7 @@ func isRetryable(err error) bool {
|
||||
if err == nil {
|
||||
return false
|
||||
}
|
||||
// rpcError values come from bitcoind itself — check for warmup/
|
||||
// rpcError values come from bitcoind itself, check for warmup/
|
||||
// loading messages that mean "ask again in a moment".
|
||||
var rerr *rpcError
|
||||
if errors.As(err, &rerr) {
|
||||
|
||||
@@ -119,7 +119,7 @@ func TestCall_RetryOnTransient503(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestCall_ExhaustsRetries(t *testing.T) {
|
||||
// Server always returns 503 — all 3 attempts should fail.
|
||||
// Server always returns 503, all 3 attempts should fail.
|
||||
srv, calls := jsonRPCServer(t, 99, nil)
|
||||
rpc := NewRPC(srv.URL, "u", "p", 5*time.Second)
|
||||
|
||||
@@ -134,7 +134,7 @@ func TestCall_ExhaustsRetries(t *testing.T) {
|
||||
|
||||
func TestCall_NoRetryOnSemanticRPCError(t *testing.T) {
|
||||
// Server returns a semantic RPC error (block not found). Should not be
|
||||
// retried — the answer is definitive.
|
||||
// retried, the answer is definitive.
|
||||
var calls int32
|
||||
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
atomic.AddInt32(&calls, 1)
|
||||
|
||||
Reference in new issue
Block a user