Coverage Summary for Class: BridgeEventLogger (co.rsk.peg.utils)

Class
BridgeEventLogger


1 /* 2  * This file is part of RskJ 3  * Copyright (C) 2017 RSK Labs Ltd. 4  * 5  * This program is free software: you can redistribute it and/or modify 6  * it under the terms of the GNU Lesser General Public License as published by 7  * the Free Software Foundation, either version 3 of the License, or 8  * (at your option) any later version. 9  * 10  * This program is distributed in the hope that it will be useful, 11  * but WITHOUT ANY WARRANTY; without even the implied warranty of 12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13  * GNU Lesser General Public License for more details. 14  * 15  * You should have received a copy of the GNU Lesser General Public License 16  * along with this program. If not, see <http://www.gnu.org/licenses/>. 17  */ 18  19 package co.rsk.peg.utils; 20  21 import co.rsk.bitcoinj.core.Address; 22 import co.rsk.bitcoinj.core.BtcECKey; 23 import co.rsk.bitcoinj.core.BtcTransaction; 24 import co.rsk.bitcoinj.core.Coin; 25 import co.rsk.core.RskAddress; 26 import co.rsk.peg.Federation; 27 import org.ethereum.core.Block; 28 import org.ethereum.core.Transaction; 29  30 /** 31  * Responsible for logging events triggered by BridgeContract. 32  * 33  * @author martin.medina 34  */ 35 public interface BridgeEventLogger { 36  37  void logUpdateCollections(Transaction rskTx); 38  39  void logAddSignature(BtcECKey federatorPublicKey, BtcTransaction btcTx, byte[] rskTxHash); 40  41  void logReleaseBtc(BtcTransaction btcTx, byte[] rskTxHash); 42  43  void logCommitFederation(Block executionBlock, Federation oldFederation, Federation newFederation); 44  45  void logLockBtc(RskAddress rskReceiver, BtcTransaction btcTx, Address senderBtcAddress, Coin amount); 46  47  void logPeginBtc(RskAddress rskReceiver, BtcTransaction btcTx, Coin amount, int protocolVersion); 48  49  void logReleaseBtcRequested(byte[] rskTxHash, BtcTransaction btcTx, Coin amount); 50  51  void logRejectedPegin(BtcTransaction btcTx, RejectedPeginReason reason); 52  53  void logUnrefundablePegin(BtcTransaction btcTx, UnrefundablePeginReason reason); 54  55  56  void logReleaseBtcRequestReceived(String sender, byte[] btcDestinationAddress, Coin amount); 57  58  void logReleaseBtcRequestRejected(String sender, Coin amount, RejectedPegoutReason reason); 59 }