node/pkg/solana: verbose logging for observations
certusone/wormhole#248 Change-Id: Iae4b4d187e8d6728de9087e43c5f8a7b4d821540
This commit is contained in:
parent
d5e6c844e3
commit
cd8d2f68ed
|
@ -332,7 +332,7 @@ func (s *SolanaWatcher) processMessageAccount(logger *zap.Logger, data []byte, a
|
||||||
var txHash eth_common.Hash
|
var txHash eth_common.Hash
|
||||||
copy(txHash[:], acc[:])
|
copy(txHash[:], acc[:])
|
||||||
|
|
||||||
lock := &common.MessagePublication{
|
observation := &common.MessagePublication{
|
||||||
TxHash: txHash,
|
TxHash: txHash,
|
||||||
Timestamp: time.Unix(int64(proposal.SubmissionTime), 0),
|
Timestamp: time.Unix(int64(proposal.SubmissionTime), 0),
|
||||||
Nonce: proposal.Nonce,
|
Nonce: proposal.Nonce,
|
||||||
|
@ -346,9 +346,17 @@ func (s *SolanaWatcher) processMessageAccount(logger *zap.Logger, data []byte, a
|
||||||
solanaMessagesConfirmed.Inc()
|
solanaMessagesConfirmed.Inc()
|
||||||
|
|
||||||
logger.Info("message observed",
|
logger.Info("message observed",
|
||||||
zap.Stringer("account", acc))
|
zap.Stringer("account", acc),
|
||||||
|
zap.Time("timestamp", observation.Timestamp),
|
||||||
|
zap.Uint32("nonce", observation.Nonce),
|
||||||
|
zap.Uint64("sequence", observation.Sequence),
|
||||||
|
zap.Stringer("emitter_chain", observation.EmitterChain),
|
||||||
|
zap.Stringer("emitter_address", observation.EmitterAddress),
|
||||||
|
zap.Binary("payload", observation.Payload),
|
||||||
|
zap.Uint8("consistency_level", observation.ConsistencyLevel),
|
||||||
|
)
|
||||||
|
|
||||||
s.messageEvent <- lock
|
s.messageEvent <- observation
|
||||||
}
|
}
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
|
|
@ -78,13 +78,13 @@ func (c ChainID) String() string {
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// ChainIDSolana is the ChainID of Solana
|
// ChainIDSolana is the ChainID of Solana
|
||||||
ChainIDSolana = 1
|
ChainIDSolana ChainID = 1
|
||||||
// ChainIDEthereum is the ChainID of Ethereum
|
// ChainIDEthereum is the ChainID of Ethereum
|
||||||
ChainIDEthereum = 2
|
ChainIDEthereum ChainID = 2
|
||||||
// ChainIDTerra is the ChainID of Terra
|
// ChainIDTerra is the ChainID of Terra
|
||||||
ChainIDTerra = 3
|
ChainIDTerra ChainID = 3
|
||||||
// ChainIDBSC is the ChainID of Binance Smart Chain
|
// ChainIDBSC is the ChainID of Binance Smart Chain
|
||||||
ChainIDBSC = 4
|
ChainIDBSC ChainID = 4
|
||||||
|
|
||||||
minVAALength = 1 + 4 + 52 + 4 + 1 + 1
|
minVAALength = 1 + 4 + 52 + 4 + 1 + 1
|
||||||
SupportedVAAVersion = 0x01
|
SupportedVAAVersion = 0x01
|
||||||
|
|
Loading…
Reference in New Issue