mirror of
https://github.com/kaspanet/kaspad.git
synced 2026-03-05 00:28:51 +00:00
Compare commits
1 Commits
v0.9.2-rc1
...
github-dep
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7de07cdc97 |
31
.github/workflows/go-deploy.yml
vendored
31
.github/workflows/go-deploy.yml
vendored
@@ -37,33 +37,24 @@ jobs:
|
|||||||
# `-extldflags=-static` - means static link everything, `-tags netgo,osusergo` means use pure go replacements for "os/user" and "net"
|
# `-extldflags=-static` - means static link everything, `-tags netgo,osusergo` means use pure go replacements for "os/user" and "net"
|
||||||
# `-s -w` strips the binary to produce smaller size binaries
|
# `-s -w` strips the binary to produce smaller size binaries
|
||||||
run: |
|
run: |
|
||||||
go build -v -ldflags="-s -w -extldflags=-static" -tags netgo,osusergo -o ./bin/ ./...
|
binary="kaspad-${{ github.event.release.tag_name }}-linux"
|
||||||
archive="bin/kaspad-${{ github.event.release.tag_name }}-linux.zip"
|
echo "binary=${binary}" >> $GITHUB_ENV
|
||||||
asset_name="kaspad-${{ github.event.release.tag_name }}-linux.zip"
|
go build -v -ldflags="-s -w -extldflags=-static" -tags netgo,osusergo -o "${binary}"
|
||||||
zip -r "${archive}" ./bin/*
|
|
||||||
echo "archive=${archive}" >> $GITHUB_ENV
|
|
||||||
echo "asset_name=${asset_name}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Build on Windows
|
- name: Build on Windows
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
go build -v -ldflags="-s -w" -o bin/ ./...
|
binary="kaspad-${{ github.event.release.tag_name }}-win64.exe"
|
||||||
archive="bin/kaspad-${{ github.event.release.tag_name }}-win64.zip"
|
echo "binary=${binary}" >> $GITHUB_ENV
|
||||||
asset_name="kaspad-${{ github.event.release.tag_name }}-win64.zip"
|
go build -v -ldflags="-s -w" -o "${binary}"
|
||||||
powershell "Compress-Archive bin/* \"${archive}\""
|
|
||||||
echo "archive=${archive}" >> $GITHUB_ENV
|
|
||||||
echo "asset_name=${asset_name}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Build on MacOS
|
- name: Build on MacOS
|
||||||
if: runner.os == 'macOS'
|
if: runner.os == 'macOS'
|
||||||
run: |
|
run: |
|
||||||
go build -v -ldflags="-s -w" -o ./bin/ ./...
|
binary="kaspad-${{ github.event.release.tag_name }}-osx"
|
||||||
archive="bin/kaspad-${{ github.event.release.tag_name }}-osx.zip"
|
echo "binary=${binary}" >> $GITHUB_ENV
|
||||||
asset_name="kaspad-${{ github.event.release.tag_name }}-osx.zip"
|
go build -v -ldflags="-s -w" -o "${binary}"
|
||||||
zip -r "${archive}" ./bin/*
|
|
||||||
echo "archive=${archive}" >> $GITHUB_ENV
|
|
||||||
echo "asset_name=${asset_name}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
|
|
||||||
- name: Upload Release Asset
|
- name: Upload Release Asset
|
||||||
@@ -72,6 +63,6 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ github.event.release.upload_url }}
|
upload_url: ${{ github.event.release.upload_url }}
|
||||||
asset_path: "./${{ env.archive }}"
|
asset_path: "./${{ env.binary }}"
|
||||||
asset_name: "${{ env.asset_name }}"
|
asset_name: "${{ env.binary }}"
|
||||||
asset_content_type: application/zip
|
asset_content_type: application/zip
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ func (m *Manager) registerTransactionRelayFlow(router *routerpkg.Router, isStopp
|
|||||||
outgoingRoute := router.OutgoingRoute()
|
outgoingRoute := router.OutgoingRoute()
|
||||||
|
|
||||||
return []*flow{
|
return []*flow{
|
||||||
m.registerFlowWithCapacity("HandleRelayedTransactions", 10_000, router,
|
m.registerFlow("HandleRelayedTransactions", router,
|
||||||
[]appmessage.MessageCommand{appmessage.CmdInvTransaction, appmessage.CmdTx, appmessage.CmdTransactionNotFound}, isStopping, errChan,
|
[]appmessage.MessageCommand{appmessage.CmdInvTransaction, appmessage.CmdTx, appmessage.CmdTransactionNotFound}, isStopping, errChan,
|
||||||
func(incomingRoute *routerpkg.Route, peer *peerpkg.Peer) error {
|
func(incomingRoute *routerpkg.Route, peer *peerpkg.Peer) error {
|
||||||
return transactionrelay.HandleRelayedTransactions(m.context, incomingRoute, outgoingRoute)
|
return transactionrelay.HandleRelayedTransactions(m.context, incomingRoute, outgoingRoute)
|
||||||
@@ -274,24 +274,6 @@ func (m *Manager) registerFlow(name string, router *routerpkg.Router, messageTyp
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return m.registerFlowForRoute(route, name, isStopping, errChan, initializeFunc)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *Manager) registerFlowWithCapacity(name string, capacity int, router *routerpkg.Router,
|
|
||||||
messageTypes []appmessage.MessageCommand, isStopping *uint32,
|
|
||||||
errChan chan error, initializeFunc flowInitializeFunc) *flow {
|
|
||||||
|
|
||||||
route, err := router.AddIncomingRouteWithCapacity(capacity, messageTypes)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
return m.registerFlowForRoute(route, name, isStopping, errChan, initializeFunc)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *Manager) registerFlowForRoute(route *routerpkg.Route, name string, isStopping *uint32,
|
|
||||||
errChan chan error, initializeFunc flowInitializeFunc) *flow {
|
|
||||||
|
|
||||||
return &flow{
|
return &flow{
|
||||||
name: name,
|
name: name,
|
||||||
executeFunc: func(peer *peerpkg.Peer) {
|
executeFunc: func(peer *peerpkg.Peer) {
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
|
|
||||||
Kaspad v0.9.1 - 2021-03-14
|
|
||||||
===========================
|
|
||||||
* Testnet network reset
|
|
||||||
|
|
||||||
Kaspad v0.9.0 - 2021-03-04
|
Kaspad v0.9.0 - 2021-03-04
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
|||||||
@@ -35,32 +35,13 @@ func NewRouter() *Router {
|
|||||||
// be routed to the given `route`
|
// be routed to the given `route`
|
||||||
func (r *Router) AddIncomingRoute(messageTypes []appmessage.MessageCommand) (*Route, error) {
|
func (r *Router) AddIncomingRoute(messageTypes []appmessage.MessageCommand) (*Route, error) {
|
||||||
route := NewRoute()
|
route := NewRoute()
|
||||||
err := r.initializeIncomingRoute(route, messageTypes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return route, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddIncomingRouteWithCapacity registers the messages of types `messageTypes` to
|
|
||||||
// be routed to the given `route` with a capacity of `capacity`
|
|
||||||
func (r *Router) AddIncomingRouteWithCapacity(capacity int, messageTypes []appmessage.MessageCommand) (*Route, error) {
|
|
||||||
route := newRouteWithCapacity(capacity)
|
|
||||||
err := r.initializeIncomingRoute(route, messageTypes)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return route, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *Router) initializeIncomingRoute(route *Route, messageTypes []appmessage.MessageCommand) error {
|
|
||||||
for _, messageType := range messageTypes {
|
for _, messageType := range messageTypes {
|
||||||
if r.doesIncomingRouteExist(messageType) {
|
if r.doesIncomingRouteExist(messageType) {
|
||||||
return errors.Errorf("a route for '%s' already exists", messageType)
|
return nil, errors.Errorf("a route for '%s' already exists", messageType)
|
||||||
}
|
}
|
||||||
r.setIncomingRoute(messageType, route)
|
r.setIncomingRoute(messageType, route)
|
||||||
}
|
}
|
||||||
return nil
|
return route, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// RemoveRoute unregisters the messages of types `messageTypes` from
|
// RemoveRoute unregisters the messages of types `messageTypes` from
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const validCharacters = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs
|
|||||||
const (
|
const (
|
||||||
appMajor uint = 0
|
appMajor uint = 0
|
||||||
appMinor uint = 9
|
appMinor uint = 9
|
||||||
appPatch uint = 2
|
appPatch uint = 1
|
||||||
)
|
)
|
||||||
|
|
||||||
// appBuild is defined as a variable so it can be overridden during the build
|
// appBuild is defined as a variable so it can be overridden during the build
|
||||||
|
|||||||
Reference in New Issue
Block a user