Skip to content

Commit

Permalink
chore(IBC): remove unused params
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Apr 3, 2024
1 parent c9ee4ec commit 44107b9
Showing 1 changed file with 11 additions and 36 deletions.
47 changes: 11 additions & 36 deletions packages/vats/src/ibc.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,7 @@ export const prepareIBCConnectionHandler = zone => {
};
return protocolUtils.ibcSendPacket(packet, relativeTimeoutNs);
},
/**
* @param {any} _conn
* @param {any} _reason
* @param {any} _handler
*/
async onClose(_conn, _reason, _handler) {
async onClose() {
const { portID, channelID } = this.state;
const { protocolUtils, channelKeyToSeqAck } = this.state;

Expand Down Expand Up @@ -272,32 +267,24 @@ export const prepareIBCProtocol = (zone, powers) => {
},
{
protocolHandler: {
/**
* @param {import('@agoric/vow').Remote<ProtocolImpl, {}> | null} impl
* @param {any} _protocolHandler
*/
async onCreate(impl, _protocolHandler) {
/** @param {import('@agoric/vow').Remote<ProtocolImpl, {}> | null} impl */
async onCreate(impl) {
console.debug('IBC onCreate');
this.state.protocolImpl = impl;
},
async onInstantiate() {
// The IBC channel is not known until after handshake.
return '';
},
/**
* @param {any} _localAddr
* @param {any} _protocolHandler
*/
async generatePortID(_localAddr, _protocolHandler) {
async generatePortID() {
this.state.lastPortID += 1n;
return `port-${this.state.lastPortID}`;
},
/**
* @param {Port} port
* @param {Port} _port
* @param {string} localAddr
* @param {any} _protocolHandler
*/
async onBind(port, localAddr, _protocolHandler) {
async onBind(_port, localAddr) {
const { util } = this.facets;
const { portToPendingConns } = this.state;

Expand All @@ -309,19 +296,11 @@ export const prepareIBCProtocol = (zone, powers) => {
return util.downcall('bindPort', { packet });
},
/**
* @param {Port} port
* @param {Port} _port
* @param {string} localAddr
* @param {string} remoteAddr
* @param {any} _chandler
* @param {any} _protocolHandler
*/
async onConnect(
port,
localAddr,
remoteAddr,
_chandler,
_protocolHandler,
) {
async onConnect(_port, localAddr, remoteAddr) {
const { util } = this.facets;
const { portToPendingConns, srcPortToOutbounds } = this.state;

Expand Down Expand Up @@ -396,25 +375,22 @@ export const prepareIBCProtocol = (zone, powers) => {
/**
* @param {Port} _port
* @param {string} localAddr
* @param {any} _listenHandler
*/
async onListen(_port, localAddr, _listenHandler) {
async onListen(_port, localAddr) {
console.debug('IBC onListen', localAddr);
},
/**
* @param {Port} _port
* @param {string} localAddr
* @param {any} _listenHandler
*/
async onListenRemove(_port, localAddr, _listenHandler) {
async onListenRemove(_port, localAddr) {
console.debug('IBC onListenRemove', localAddr);
},
/**
* @param {Port} _port
* @param {string} localAddr
* @param {any} _protocolHandler
*/
async onRevoke(_port, localAddr, _protocolHandler) {
async onRevoke(_port, localAddr) {
const { util } = this.facets;
const { portToPendingConns } = this.state;

Expand Down Expand Up @@ -919,7 +895,6 @@ export const prepareIBCProtocol = (zone, powers) => {
};
return provideIBCProtocolHandlerKit;
};

harden(prepareIBCProtocol);

/** @param {import('@agoric/base-zone').Zone} zone */
Expand Down

0 comments on commit 44107b9

Please sign in to comment.