mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 23:48:06 -05:00
Disable Codecov Patch As It Is Unreliable (#713)
This commit is contained in:
26
.codecov.yml
Normal file
26
.codecov.yml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
codecov:
|
||||||
|
notify:
|
||||||
|
require_ci_to_pass: yes
|
||||||
|
|
||||||
|
coverage:
|
||||||
|
precision: 2
|
||||||
|
round: down
|
||||||
|
range: "70...100"
|
||||||
|
|
||||||
|
status:
|
||||||
|
project: yes
|
||||||
|
patch: no
|
||||||
|
changes: no
|
||||||
|
|
||||||
|
parsers:
|
||||||
|
gcov:
|
||||||
|
branch_detection:
|
||||||
|
conditional: yes
|
||||||
|
loop: yes
|
||||||
|
method: no
|
||||||
|
macro: no
|
||||||
|
|
||||||
|
comment:
|
||||||
|
layout: "header, diff"
|
||||||
|
behavior: default
|
||||||
|
require_changes: no
|
||||||
@@ -46,6 +46,7 @@ func (db *BeaconDB) GetAttestation(hash [32]byte) (*types.Attestation, error) {
|
|||||||
// HasAttestation checks if the attestation exists.
|
// HasAttestation checks if the attestation exists.
|
||||||
func (db *BeaconDB) HasAttestation(hash [32]byte) bool {
|
func (db *BeaconDB) HasAttestation(hash [32]byte) bool {
|
||||||
exists := false
|
exists := false
|
||||||
|
// #nosec G104
|
||||||
db.view(func(tx *bolt.Tx) error {
|
db.view(func(tx *bolt.Tx) error {
|
||||||
a := tx.Bucket(attestationBucket)
|
a := tx.Bucket(attestationBucket)
|
||||||
|
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ func (db *BeaconDB) GetBlock(hash [32]byte) (*types.Block, error) {
|
|||||||
// HasBlock accepts a block hash and returns true if the block does not exist.
|
// HasBlock accepts a block hash and returns true if the block does not exist.
|
||||||
func (db *BeaconDB) HasBlock(hash [32]byte) bool {
|
func (db *BeaconDB) HasBlock(hash [32]byte) bool {
|
||||||
hasBlock := false
|
hasBlock := false
|
||||||
|
// #nosec G104
|
||||||
_ = db.view(func(tx *bolt.Tx) error {
|
_ = db.view(func(tx *bolt.Tx) error {
|
||||||
b := tx.Bucket(blockBucket)
|
b := tx.Bucket(blockBucket)
|
||||||
|
|
||||||
|
|||||||
@@ -52,9 +52,11 @@ func NewDB(dirPath string) (*BeaconDB, error) {
|
|||||||
|
|
||||||
db := &BeaconDB{db: boltDB}
|
db := &BeaconDB{db: boltDB}
|
||||||
|
|
||||||
db.update(func(tx *bolt.Tx) error {
|
if err := db.update(func(tx *bolt.Tx) error {
|
||||||
return createBuckets(tx, blockBucket, attestationBucket, mainChainBucket, chainInfoBucket)
|
return createBuckets(tx, blockBucket, attestationBucket, mainChainBucket, chainInfoBucket)
|
||||||
})
|
}); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
return db, nil
|
return db, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ func TestNodeValidator_Builds(t *testing.T) {
|
|||||||
app := cli.NewApp()
|
app := cli.NewApp()
|
||||||
set := flag.NewFlagSet("test", 0)
|
set := flag.NewFlagSet("test", 0)
|
||||||
set.String("web3provider", "ws//127.0.0.1:8546", "web3 provider ws or IPC endpoint")
|
set.String("web3provider", "ws//127.0.0.1:8546", "web3 provider ws or IPC endpoint")
|
||||||
tmp := fmt.Sprintf("%s/datadir", os.TempDir())
|
tmp := fmt.Sprintf("%s/datadirtest1", os.TempDir())
|
||||||
set.String("datadir", tmp, "node data directory")
|
set.String("datadir", tmp, "node data directory")
|
||||||
set.Bool("enable-powchain", true, "enable powchain")
|
set.Bool("enable-powchain", true, "enable powchain")
|
||||||
|
|
||||||
@@ -39,6 +39,8 @@ func TestNodeValidator_Builds(t *testing.T) {
|
|||||||
if e, ok := err.(*exec.ExitError); !ok || e.Success() {
|
if e, ok := err.(*exec.ExitError); !ok || e.Success() {
|
||||||
t.Fatalf("Process ran with err %v, want exit status 1", err)
|
t.Fatalf("Process ran with err %v, want exit status 1", err)
|
||||||
}
|
}
|
||||||
|
tmp := fmt.Sprintf("%s/datadirtest1", os.TempDir())
|
||||||
|
os.RemoveAll(tmp)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test that beacon chain node can close.
|
// Test that beacon chain node can close.
|
||||||
@@ -47,7 +49,7 @@ func TestNodeClose(t *testing.T) {
|
|||||||
app := cli.NewApp()
|
app := cli.NewApp()
|
||||||
set := flag.NewFlagSet("test", 0)
|
set := flag.NewFlagSet("test", 0)
|
||||||
set.String("web3provider", "ws//127.0.0.1:8546", "web3 provider ws or IPC endpoint")
|
set.String("web3provider", "ws//127.0.0.1:8546", "web3 provider ws or IPC endpoint")
|
||||||
tmp := fmt.Sprintf("%s/datadir", os.TempDir())
|
tmp := fmt.Sprintf("%s/datadirtest2", os.TempDir())
|
||||||
set.String("datadir", tmp, "node data directory")
|
set.String("datadir", tmp, "node data directory")
|
||||||
set.Bool("enable-powchain", false, "no powchain service")
|
set.Bool("enable-powchain", false, "no powchain service")
|
||||||
set.Bool("demo-config", true, "demo configuration")
|
set.Bool("demo-config", true, "demo configuration")
|
||||||
|
|||||||
Reference in New Issue
Block a user