mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-17 10:20:44 +00:00
parent
395071e9f6
commit
590cbafae9
4 changed files with 13 additions and 13 deletions
|
|
@ -26,7 +26,6 @@ import (
|
||||||
|
|
||||||
"github.com/XinFinOrg/XDPoSChain/XDCx"
|
"github.com/XinFinOrg/XDPoSChain/XDCx"
|
||||||
"github.com/XinFinOrg/XDPoSChain/XDCxlending"
|
"github.com/XinFinOrg/XDPoSChain/XDCxlending"
|
||||||
|
|
||||||
"github.com/XinFinOrg/XDPoSChain/common"
|
"github.com/XinFinOrg/XDPoSChain/common"
|
||||||
"github.com/XinFinOrg/XDPoSChain/core"
|
"github.com/XinFinOrg/XDPoSChain/core"
|
||||||
"github.com/XinFinOrg/XDPoSChain/eth"
|
"github.com/XinFinOrg/XDPoSChain/eth"
|
||||||
|
|
|
||||||
|
|
@ -3,15 +3,15 @@ package main
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/XinFinOrg/XDPoSChain/XDCxlending/lendingstate"
|
|
||||||
"github.com/XinFinOrg/XDPoSChain/core/state"
|
|
||||||
"math/big"
|
"math/big"
|
||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/XinFinOrg/XDPoSChain/XDCxlending/lendingstate"
|
||||||
"github.com/XinFinOrg/XDPoSChain/accounts/abi/bind"
|
"github.com/XinFinOrg/XDPoSChain/accounts/abi/bind"
|
||||||
"github.com/XinFinOrg/XDPoSChain/common"
|
"github.com/XinFinOrg/XDPoSChain/common"
|
||||||
"github.com/XinFinOrg/XDPoSChain/contracts/XDCx"
|
"github.com/XinFinOrg/XDPoSChain/contracts/XDCx"
|
||||||
|
"github.com/XinFinOrg/XDPoSChain/core/state"
|
||||||
"github.com/XinFinOrg/XDPoSChain/crypto"
|
"github.com/XinFinOrg/XDPoSChain/crypto"
|
||||||
"github.com/XinFinOrg/XDPoSChain/ethclient"
|
"github.com/XinFinOrg/XDPoSChain/ethclient"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,15 @@ package main
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"log"
|
||||||
|
"math/big"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/XinFinOrg/XDPoSChain/accounts/abi/bind"
|
"github.com/XinFinOrg/XDPoSChain/accounts/abi/bind"
|
||||||
"github.com/XinFinOrg/XDPoSChain/common"
|
"github.com/XinFinOrg/XDPoSChain/common"
|
||||||
"github.com/XinFinOrg/XDPoSChain/contracts/trc21issuer"
|
"github.com/XinFinOrg/XDPoSChain/contracts/trc21issuer"
|
||||||
"github.com/XinFinOrg/XDPoSChain/contracts/trc21issuer/simulation"
|
"github.com/XinFinOrg/XDPoSChain/contracts/trc21issuer/simulation"
|
||||||
"github.com/XinFinOrg/XDPoSChain/ethclient"
|
"github.com/XinFinOrg/XDPoSChain/ethclient"
|
||||||
"log"
|
|
||||||
"math/big"
|
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/XinFinOrg/XDPoSChain/log"
|
"github.com/XinFinOrg/XDPoSChain/log"
|
||||||
"github.com/jackpal/go-nat-pmp"
|
natpmp "github.com/jackpal/go-nat-pmp"
|
||||||
)
|
)
|
||||||
|
|
||||||
// An implementation of nat.Interface can map local ports to ports
|
// An implementation of nat.Interface can map local ports to ports
|
||||||
|
|
@ -53,12 +53,12 @@ type Interface interface {
|
||||||
// The following formats are currently accepted.
|
// The following formats are currently accepted.
|
||||||
// Note that mechanism names are not case-sensitive.
|
// Note that mechanism names are not case-sensitive.
|
||||||
//
|
//
|
||||||
// "" or "none" return nil
|
// "" or "none" return nil
|
||||||
// "extip:77.12.33.4" will assume the local machine is reachable on the given IP
|
// "extip:77.12.33.4" will assume the local machine is reachable on the given IP
|
||||||
// "any" uses the first auto-detected mechanism
|
// "any" uses the first auto-detected mechanism
|
||||||
// "upnp" uses the Universal Plug and Play protocol
|
// "upnp" uses the Universal Plug and Play protocol
|
||||||
// "pmp" uses NAT-PMP with an auto-detected gateway address
|
// "pmp" uses NAT-PMP with an auto-detected gateway address
|
||||||
// "pmp:192.168.0.1" uses NAT-PMP with the given gateway address
|
// "pmp:192.168.0.1" uses NAT-PMP with the given gateway address
|
||||||
func Parse(spec string) (Interface, error) {
|
func Parse(spec string) (Interface, error) {
|
||||||
var (
|
var (
|
||||||
before, after, found = strings.Cut(spec, ":")
|
before, after, found = strings.Cut(spec, ":")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue