mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-11 04:00:05 +00:00
Use better deposit logging at info (#1528)
* Use better logging at info * Update service_test.go
This commit is contained in:
parent
7078382b82
commit
031a9c96b9
@ -242,7 +242,7 @@ func (w *Web3Service) ProcessLog(VRClog gethTypes.Log) {
|
||||
// the ETH1.0 chain by trying to ascertain which participant deposited
|
||||
// in the contract.
|
||||
func (w *Web3Service) ProcessDepositLog(VRClog gethTypes.Log) {
|
||||
merkleRoot, depositData, MerkleTreeIndex, merkleBranch, err := contracts.UnpackDepositLogData(VRClog.Data)
|
||||
merkleRoot, depositData, MerkleTreeIndex, _, err := contracts.UnpackDepositLogData(VRClog.Data)
|
||||
if err != nil {
|
||||
log.Errorf("Could not unpack log %v", err)
|
||||
return
|
||||
@ -266,10 +266,9 @@ func (w *Web3Service) ProcessDepositLog(VRClog gethTypes.Log) {
|
||||
}
|
||||
index := binary.BigEndian.Uint64(MerkleTreeIndex)
|
||||
log.WithFields(logrus.Fields{
|
||||
"publicKey": depositInput.Pubkey,
|
||||
"merkle tree index": index,
|
||||
"merkle branch": merkleBranch,
|
||||
}).Info("Validator registered in VRC with public key and index")
|
||||
"publicKey": fmt.Sprintf("%#x", depositInput.Pubkey),
|
||||
"merkleTreeIndex": index,
|
||||
}).Info("Validator registered in deposit contract")
|
||||
validDepositsCount.Inc()
|
||||
}
|
||||
|
||||
|
@ -460,7 +460,7 @@ func TestProcessDepositLog(t *testing.T) {
|
||||
testutil.AssertLogsDoNotContain(t, hook, "Could not unpack log")
|
||||
testutil.AssertLogsDoNotContain(t, hook, "Could not save in trie")
|
||||
testutil.AssertLogsDoNotContain(t, hook, "Could not decode deposit input")
|
||||
testutil.AssertLogsContain(t, hook, "Validator registered in VRC with public key and index")
|
||||
testutil.AssertLogsContain(t, hook, "Validator registered in deposit contract")
|
||||
|
||||
hook.Reset()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user