Skip to content

Commit

Permalink
Merge commit 'v0.13.5-rc1' into development
Browse files Browse the repository at this point in the history
* commit 'd33fcef7e9ce91430281de15278f13b23b4f3066': (99 commits)
  Bump version to v0.13.5
  [OpenBazaar#1069] Improve edge cases and tests for POST /ob/resendordermessage
  Move Migration024 to 025 for merge from master
  Update latest fixes from multiwallet dep
  Fix imports; Add offline timeout to ORDER_PAYMENT sending
  Update multiwallet dependency
  pull in the upstream changes to vendor repos
  Update unit tests and fix nits
  Remove usage of core.Node global and fix nits
  [OpenBazaar#1069] Analyze/send ORDER messages on ORDER_PROCESSING_ERROR
  [OpenBazaar#1069] GGenerate OrderProcessingFailure message on local node
  Add error handling; Cleanup ErrEmptyPayload usage; Extra failure logging
  Update dev Docker to guarantee v1.2.0 protoc-gen-go
  remove return if extract address from pkscript fails for creation of txOut
  change the txn callback height to 0
  Fix bug initializing resyncManager
  Set resync interval to 15 minutes
  Refactor rescan manager and add migration024
  fix indentation and modify the offline scan conditional
  add txnOutputs to wallet interface txn and modify the GetTransaction function to populate the txnOutputs for use in the order payment message handler
  ...
  • Loading branch information
anchaj committed Feb 15, 2020
2 parents 29ed802 + d33fcef commit d0c77b4
Show file tree
Hide file tree
Showing 140 changed files with 11,501 additions and 3,100 deletions.
24 changes: 20 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
# Build stage - Use a full build environment to create a static binary
FROM golang:1.11
WORKDIR /go/src/github.com/OpenBazaar/openbazaar-go
COPY . .
RUN go build --ldflags '-extldflags "-static"' -o /opt/openbazaard .
COPY . /go/src/github.com/OpenBazaar/openbazaar-go
RUN go build --ldflags '-extldflags "-static"' -o /opt/openbazaard /go/src/github.com/OpenBazaar/openbazaar-go

# Final state - Create image containing nothing but the openbazaard binary and
# some base settings
FROM openbazaar/base:v1.0.0

# Document ports in use
# 4002 - HTTP(s) API
# 4001 - libp2p/IPFS TCP port
# 9005 - libp2p/IPFS websocket port
EXPOSE 5001 5002 10005
ENTRYPOINT ["/opt/openbazaard"]

# Define a volume to perist data to. This data contains all the important
# elements defining a peer so it must be durable as long as the identity exists
VOLUME /var/lib/openbazaar

# Tell the image what to execute by default. We start a mainnet OB server
# that uses the defined volume for node data
ENTRYPOINT ["/opt/openbazaard"]
CMD ["start", "-d", "/var/lib/openbazaar"]

# Copy the compiled binary into this image. It's COPY'd last since the rest of
# this stage rarely changes while the binary changes every commit
COPY --from=0 /opt/openbazaard /opt/openbazaard
5 changes: 5 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ RUN go get -u github.com/gogo/protobuf/proto \
github.com/derekparker/delve/cmd/dlv \
github.com/tools/godep

RUN cd /go/src/github.com/golang/protobuf && \
git checkout tags/v1.2.0 -b v1.2.0 && \
cd protoc-gen-go && \
go install

RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.15.0

WORKDIR /go/src/github.com/phoreproject/openbazaar-go
Expand Down
21 changes: 17 additions & 4 deletions Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions api/endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ func post(i *jsonAPIHandler, path string, w http.ResponseWriter, r *http.Request
i.POSTPost(w, r)
case strings.HasPrefix(path, "/ob/bulkupdatecurrency"):
i.POSTBulkUpdateCurrency(w, r)
case strings.HasPrefix(path, "/ob/resendordermessage"):
i.POSTResendOrderMessage(w, r)
case strings.HasPrefix(path, "/manage/initwallet"):
i.POSTInitWallet(w, r)
case strings.HasPrefix(path, "/manage/unlockwallet"):
Expand Down Expand Up @@ -201,12 +203,16 @@ func get(i *jsonAPIHandler, path string, w http.ResponseWriter, r *http.Request)
i.GETWalletStatus(w, r)
case strings.HasPrefix(path, "/ob/ipns"):
i.GETIPNS(w, r)
case strings.HasPrefix(path, "/ob/resolveipns"):
i.GETResolveIPNS(w, r)
case strings.HasPrefix(path, "/ob/peerinfo"):
i.GETPeerInfo(w, r)
case strings.HasPrefix(path, "/ob/posts"):
i.GETPosts(w, r)
case strings.HasPrefix(path, "/ob/post"):
i.GETPost(w, r)
case strings.HasPrefix(path, "/ob/scanofflinemessages"):
i.GETScanOfflineMessages(w, r)
case strings.HasPrefix(path, "/manage/iswalletlocked"):
i.GETIsWalletLocked(w, r)
default:
Expand Down
13 changes: 6 additions & 7 deletions api/gateway.go
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
package api

import (
"net"
"net/http"

"github.com/ipfs/go-ipfs/core/corehttp"
"github.com/op/go-logging"
"github.com/phoreproject/openbazaar-go/core"
"github.com/phoreproject/openbazaar-go/schema"
"net"
"net/http"
)

var log = logging.MustGetLogger("api")

// Gateway represents an HTTP API gateway
type Gateway struct {
listener net.Listener
handler http.Handler
config schema.APIConfig
listener net.Listener
handler http.Handler
config schema.APIConfig
gatewayRunning chan error
}

Expand Down Expand Up @@ -88,4 +87,4 @@ func (g *Gateway) Serve(blocking bool) error {
}

return nil
}
}
Loading

0 comments on commit d0c77b4

Please sign in to comment.