mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 03:30:35 +00:00
Disable Codecov Patch As It Is Unreliable (#713)
This commit is contained in:
parent
370065593f
commit
95625629f7
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.
|
||||
func (db *BeaconDB) HasAttestation(hash [32]byte) bool {
|
||||
exists := false
|
||||
// #nosec G104
|
||||
db.view(func(tx *bolt.Tx) error {
|
||||
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.
|
||||
func (db *BeaconDB) HasBlock(hash [32]byte) bool {
|
||||
hasBlock := false
|
||||
// #nosec G104
|
||||
_ = db.view(func(tx *bolt.Tx) error {
|
||||
b := tx.Bucket(blockBucket)
|
||||
|
||||
|
@ -52,9 +52,11 @@ func NewDB(dirPath string) (*BeaconDB, error) {
|
||||
|
||||
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)
|
||||
})
|
||||
}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return db, nil
|
||||
return db, err
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ func TestNodeValidator_Builds(t *testing.T) {
|
||||
app := cli.NewApp()
|
||||
set := flag.NewFlagSet("test", 0)
|
||||
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.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() {
|
||||
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.
|
||||
@ -47,7 +49,7 @@ func TestNodeClose(t *testing.T) {
|
||||
app := cli.NewApp()
|
||||
set := flag.NewFlagSet("test", 0)
|
||||
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.Bool("enable-powchain", false, "no powchain service")
|
||||
set.Bool("demo-config", true, "demo configuration")
|
||||
|
Loading…
Reference in New Issue
Block a user