[#374] Add inner-ring event metrics
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
parent
8dcd06c587
commit
ebcc8afbee
27 changed files with 287 additions and 113 deletions
|
@ -18,10 +18,10 @@ type bindCommon interface {
|
|||
TxHash() util.Uint256
|
||||
}
|
||||
|
||||
func (np *Processor) processBind(e bindCommon, bind bool) {
|
||||
func (np *Processor) processBind(e bindCommon, bind bool) bool {
|
||||
if !np.alphabetState.IsAlphabet() {
|
||||
np.log.Info(logs.FrostFSNonAlphabetModeIgnoreBind)
|
||||
return
|
||||
return true
|
||||
}
|
||||
|
||||
c := &bindCommonContext{
|
||||
|
@ -36,10 +36,10 @@ func (np *Processor) processBind(e bindCommon, bind bool) {
|
|||
zap.String("error", err.Error()),
|
||||
)
|
||||
|
||||
return
|
||||
return false
|
||||
}
|
||||
|
||||
np.approveBindCommon(c)
|
||||
return np.approveBindCommon(c) == nil
|
||||
}
|
||||
|
||||
type bindCommonContext struct {
|
||||
|
@ -70,7 +70,7 @@ func (np *Processor) checkBindCommon(e *bindCommonContext) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (np *Processor) approveBindCommon(e *bindCommonContext) {
|
||||
func (np *Processor) approveBindCommon(e *bindCommonContext) error {
|
||||
// calculate wallet address
|
||||
scriptHash := e.User()
|
||||
|
||||
|
@ -80,7 +80,7 @@ func (np *Processor) approveBindCommon(e *bindCommonContext) {
|
|||
zap.String("error", err.Error()),
|
||||
)
|
||||
|
||||
return
|
||||
return err
|
||||
}
|
||||
|
||||
var id user.ID
|
||||
|
@ -104,4 +104,6 @@ func (np *Processor) approveBindCommon(e *bindCommonContext) {
|
|||
np.log.Error(fmt.Sprintf("could not approve %s", typ),
|
||||
zap.String("error", err.Error()))
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue