Browse Source

cmd/geth: Added optional debug flag for reprocess block

obscuren 10 năm trước cách đây
mục cha
commit
9e9bd35557
1 tập tin đã thay đổi với 5 bổ sung2 xóa
  1. 5 2
      cmd/geth/admin.go

+ 5 - 2
cmd/geth/admin.go

@@ -271,9 +271,12 @@ func (js *jsre) debugBlock(call otto.FunctionCall) otto.Value {
 	}
 
 	tstart := time.Now()
-
 	old := vm.Debug
-	vm.Debug = true
+
+	if len(call.ArgumentList) > 1 {
+		vm.Debug, _ = call.Argument(1).ToBoolean()
+	}
+
 	_, err = js.ethereum.BlockProcessor().RetryProcess(block)
 	if err != nil {
 		fmt.Println(err)